Hide macros from command history

Posted by Phydeaux on Sat 10 Dec 2005 10:20 PM — 3 posts, 12,736 views.

USA #0
I'd like to see a macro option that prevents a macro from being saved in command history.

I wrote a plugin that works whenever it sees a certain text sequence in the world, which I've macro'd to a function key. When I press this key, I get that sequence in my command histroy, which isn't desired. I haven't found a way around this yet, so apologies if there's already a solution.
Australia Forum Administrator #1
There is a way ...

I assume by Macro you mean something like Alt+A in the macros configuration screen.

Rather than sending the command directly, get the macro to send something you almost certainly won't ever type in, like:

Alt+A:
Send: 0bcd6c2239d328207b4ffa7e

Then make an alias to pick up that exact sequence:


<aliases>
  <alias
   match="0bcd6c2239d328207b4ffa7e"
   enabled="y"
   omit_from_command_history="y"
   omit_from_output="y"
   sequence="100"
  >
  <send>eep</send>
  </alias>
</aliases>



What this is doing is matching the sequence the macro generated, and doing the send from the alias. With omit_from_command_history set to "y" the command is not entered into the command history.
USA #2
Ah. Much nicer. Thank you!