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

Re: How to kill string but leave it in history?



On Thu, 16 Jan 1997, Peter Stephenson wrote:

> Andrej Borsenkow wrote:
> > So - is there any way to cancel current command line but leave it in
> > history?
> 
> how about
> 
> bindkey -s "^X^H" "^['^A print -s ^M"       
> 
> works best with histignorespace set.
> 

Not exactly.

1. It doesn't work with multiline command (sorry, I had to be more precise
on this). E.g.
if .... then
if> kkldsfkl; ^X^H

Doesn't push the whole in history.

2. It echows the whole command (well, rather cosmetic).

Actually standard 'push-line' would suite just fine - _if_ it wouldn't pop
line again after next command. 

thanks

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------




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