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

Re: Change interactive command into a comment



Danh Doan wrote:
> With this piece of code in your zshrc, you could press C-x C-h to
> commit your current command to history without executing it.

Another option which covers roughly the same basic use case is the
builtin push-input widget. Rather than use the history, the current
buffer is pushed onto a separate stack and automatically popped
on the next start of the line editor.

There's also push-line and push-line-or-edit which have different
behaviour from secondary (PS2) prompts.

Oliver



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