Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug report on a Zsh' widget
- X-seq: zsh-workers 51770
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Budi <budikusasi@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: bug report on a Zsh' widget
- Date: Sun, 21 May 2023 17:30:39 -0700
- Archived-at: <https://zsh.org/workers/51770>
- In-reply-to: <CAH0GyZCT0C=XAaRuPAGSYS6o5NwDr3FNX-GrGsNJOXfGyxQCgw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH0GyZCT0C=XAaRuPAGSYS6o5NwDr3FNX-GrGsNJOXfGyxQCgw@mail.gmail.com>
On Sat, May 20, 2023 at 4:03 PM Budi <budikusasi@xxxxxxxxx> wrote:
>
> if do widget history-search-backward with user entry
>
> sudo n
>
> then shortcut key of that history search, then Zsh complete it with:
>
> sudo connmanctl disable wifi; sudo connmanctl enable wifi
You've misinterpreted history-search-backward. Doc says:
Search backward in the history for a line beginning with the first
word in the buffer.
So history-search-backward is looking for any line beginning with
"sudo", the "n" is ignored.
You want
history-beginning-search-backward
Search backward in the history for a line beginning with the
current line up to the cursor.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author