Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ctrl w behaviour: jump in front of separating characters?
- X-seq: zsh-users 26981
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>, "chiasa.men" <chiasa.men@xxxxxx>
- Subject: Re: ctrl w behaviour: jump in front of separating characters?
- Date: Wed, 25 Aug 2021 12:29:36 -0700
- Archived-at: <https://zsh.org/users/26981>
- In-reply-to: <85f1bc6c-7bab-400e-8f6c-444cf2892f8d@www.fastmail.com>
- List-id: <zsh-users.zsh.org>
- References: <1669747.SQSiQHpE4G@march> <CAH+w=7bSY_4YuWSVpdFvOoq24raUFZyKc0T-durHRc8v2KTC5g@mail.gmail.com> <85f1bc6c-7bab-400e-8f6c-444cf2892f8d@www.fastmail.com>
On Wed, Aug 25, 2021 at 11:43 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Bart Schaefer wrote on Tue, 24 Aug 2021 22:32 +00:00:
> > Writing your own widget:
> >
> > backward-kill-word-space() {
> > backward-kill-word-match
>
> This should have read «zle backward-kill-word-match».
Actually that isn't necessary, backward-kill-word-match can be run as
a function as long as it is in the context of another widget, it
doesn't have to be run as a widget on its own.
> > while [[ $LBUFFER = *' ' ]] &&
> > zle backward-delete-char
>
> Curious: Any particular reason to prefer this over «LBUFFER=${LBUFFER% }»?
I didn't confirm, but I believe the latter doesn't include the space
in the undo list and kill ring?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author