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

Re: backward-kill-word behavior

Peter Stephenson (`I') wrote:
> Here's my proposal for allowing text to be put into the kill buffer (and
> hence onto the kill ring).
> +item(tt(-P) [ tt(-bk) ] var(string))(
> +This puts var(string) into zsh's kill buffer for use with a subsequent
> +tt(yank), causing the kill-ring to be rotated.   By default, var(string)
> +will simply overwrite the text in the buffer; if the tt(-k) option is
> +given, it behaves instead like a kill command in that subsequent kills or
> +calls to tt(zle -P) cause var(string) to be appended to the existing text
> +in the kill buffer.  If the flag tt(-b) is given, the the var(string) is
> +instead inserted before any existing text in the kill buffer; this is used
> +when emulating kills in the backward direction.
>  )

This is somewhat garbled.  The point about the `kill' behaviour is that it
always means that the *next* operation on the kill buffer will
append/prepend instead of overwrite, if it follows immediately.

Thinking about it, it might be simpler to impose the -k behaviour and just
have the option -b for control.  This works much more like real kill
commands and you can do tricks with other (non-kill) zle commands if you
need to control the buffer.

Unless there's a neater way of doing it?

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

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