Sorry, didn't realise the message was not in its own thread - started again here.
On 13 Dec 2004, at 17:24, David Wooten wrote:
I'm trying to figure out a clever little trigger mechanism for Running a Command sort of "invisibly". I'd like to assign a certain command to the comma "," key, for example, and yet have the comma appear in the current TM window, thus running the said command whenever I happen in the natural course of events to type a comma ;). Now the closest I've come is to "echo" the comma and send the results to the current window, but of course this also gives me the output from the command which I wish to be discarded.
I came across a similar problem when writing a php command completion tool (http://ian.ardes.com/phpcc). The way I solved it was to write two separate commands, one outputting as a snippet, the other as a tooltip. I then wrote a macro to run both of these commands, and bound this macro to the desired key.
Cheers, ian
On Dec 13, 2004, at 18:31, Ian White wrote:
Sorry, didn't realise the message was not in its own thread - started again here.
Replying to the new thread, although it's for the OP :)
On 13 Dec 2004, at 17:24, David Wooten wrote:
[...] Now the closest I've come is to "echo" the comma and send the results to the current window, but of course this also gives me the output from the command which I wish to be discarded.
You can silence a command by redirecting it's output to /dev/null. So e.g. the command could be: cat >/dev/null somefile echo ,
And it should only output “,”.