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

Re: Getting back a command after hitting CTRL-C



2008/6/17 Richard Hartmann <richih.mailinglist@xxxxxxxxx>:
> Hi,
>
> somtimes, I will start typing a command, realize I do not want to execute
> it, hit CTRL-C, only to realize I would have saved a lot of typing if I
> had instead modified it. What I would love to see is a feature that
> holds onto the last buffer content and revives it into ZLE, so to speak.
>
> I am aware of the command stack feature and I am using it to move
> commands I do not want to execute _yet_ out of the way. I am
> specifically asking for something that could help when the milk is
> spilt, so to speak.

Bind kill-whole-line to some key and press that instead of ctrl-c, then
you can get it back with a yank. If you have a hard time not pressing ctrl-c,
try:
trap true SIGINT

-- 
Mikael Magnusson



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