Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fw: Zsh - push current command on history without executing it



Mikael Magnusson wrote:
> [...]
And I have this custom widget to help me store a command line in history
without executing it:

   commit-to-history() {
      print -s ${(z)BUFFER}
      zle send-break
   }
   zle -N commit-to-history
   bindkey "^X^H" commit-to-history

So, I type a command, hit Ctrl-X Ctrl-H, and then retrieve my command
from history when I need it.

That's perfect. Thanks.

Casper



Messages sorted by: Reverse Date, Date, Thread, Author