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

Re: Add ^C'd commands to history?

On Mon, Dec 16, 2002 at 08:53:36PM -0600, Jeremy M. Dolan wrote:
> Yeah, and it occurs to me I could "^Aecho " to get it in history, then
> wipe out this echo to run it, but I think my hands are too wired to ^C
> for things along this line to work very well.

You could also put a "echo " in front of it and a "> sometempfile" at
the end, run the other command you want to execute and then "source
sometempfile". And there are probably even more painful ways to do it...

> I think HIST_ADD_CANCELED would be useful to enough people to have it
> added. (at least as useful as the 30 or so other history options)

When I press ^C to cancel a command, i do it to really cancel and never
ever see it again. Why would i want it to add to the history? It gets
long enough without several dozens of wrong commands.

Just use the buffer stack that zle provides like anybody else.


Stephen Rüger

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