- May
- 13,399
- 190
I got the bright idea of using the PRE_EXEC alias to replace the current command line with itself followed by a timestamp, something like this (with some paraphrasing)
That was disastrous. TCC went into a variable loop (I'm guessing) using 100% of one processor. To make matters worse, since I use global aliases, all subsequent TCCs did the same thing. With several such TCCs running, and my computer's fans screaming, I used TaskMgr to kill tham all. But that left the alias intact. I finally got out of that situation by using Explorer's Run dialog to execute
I can put the timestamp on the line following the command line, not referring to %cmdline2 and leaving the command line visible but I'm still wondering if I can accomplish my original goal of appending a timestamp to the command line. Any ideas?
Code:
alias pre_exec `echo cursor_up clear_to_EOL %cmdline2 (%_date %_time)`
That was disastrous. TCC went into a variable loop (I'm guessing) using 100% of one processor. To make matters worse, since I use global aliases, all subsequent TCCs did the same thing. With several such TCCs running, and my computer's fans screaming, I used TaskMgr to kill tham all. But that left the alias intact. I finally got out of that situation by using Explorer's Run dialog to execute
tcc.exe /c unalias pre_exec
. Fortunately that worked.I can put the timestamp on the line following the command line, not referring to %cmdline2 and leaving the command line visible but I'm still wondering if I can accomplish my original goal of appending a timestamp to the command line. Any ideas?