Zsh Mailing List Archive
Messages sorted by:
Re: How to kill string but leave it in history?
- X-seq: zsh-users 617
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zsh users mailing list <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: How to kill string but leave it in history?
- Date: Thu, 16 Jan 1997 10:21:41 -0800
- In-reply-to: Peter Stephenson <pws@xxxxxx> "Re: How to kill string but leave it in history?" (Jan 16, 2:54pm)
- In-reply-to: Roderick Schertler <roderick@xxxxxxxx> "Re: How to kill string but leave it in history?" (Jan 16, 11:27am)
- In-reply-to: Zefram <zefram@xxxxxxxxxxxxxxxxx> "Re: How to kill string but leave it in history?" (Jan 16, 4:37pm)
- References: <199701161354.OAA12628@xxxxxxxxxx> <Pine.SV18.104.22.1680116135536.21461I-100000@xxxxxxxxxxxxxxxxx> <13945.199701161440@xxxxxxxxxxxxxxxxxxxxxxx> <pzg2011t6l.fsf@xxxxxxxxxxxxxxxxx> <25008.199701161637@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Jan 16, 4:37pm, Zefram wrote:
} Subject: Re: How to kill string but leave it in history?
} Roderick Schertler wrote:
} >Which reminds me, it has always bugged me that if zsh creates a
} >continuation line (like
} > $ print "foo<return>
} > dquote> _
} >) I can't go from the dquote> line back up to the first line
} Yes, this is what push-input is for.
Or push-line-or-edit, which acts like push-line at the PS1 prompt, but
at the PS2 prompt acts like push-input followed by get-line. (Saves
some vertical space and one or two keystrokes.)
In answer to the original query, this *ought* to work, and does if you
type the keystrokes by hand:
bindkey '\eq' push-line-or-edit
bindkey -s '^X^H' '\eq\e< print -s ^@\e>\e"^M'
For some reason, though, the right-hand-side of the ^X^H binding stops
as soon as either of push-input or push-line-or-edit is executed. I.e.,
the binding above acts like "bindkey -s '^X^H' '\eq'" -- all the trailing
stuff is dropped. I presume that's a bug in push-input ....
Bart Schaefer Brass Lantern Enterprises
Messages sorted by: