* bug report on a Zsh' widget
@ 2023-05-20 23:03 Budi
2023-05-22 0:30 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Budi @ 2023-05-20 23:03 UTC (permalink / raw)
To: zsh-workers
This is a commands history with the lines are numbered
285 sudo pacman --noconfirm --needed -Ss imath
286 sudo nano /etc/security/faillock.conf
287 sudo pacman --noconfirm --needed -Sc
312 sudo chmod a+s zsh
319 sudo nano /etc/local.d/local.start
336 sudo rc-service netmount restart
337 sudo pacman --noconfirm --needed -Ss whisk
338 sudo pacman --noconfirm --needed -S xfce4-whiskermenu-plugin
339 sudo pacman --noconfirm -S xfce4-whiskermenu-plugin
340 sudo pacman --noconfirm --needed -Su
418 sudo pacman --noconfirm --needed -Ss zsh
419 sudo pacman --noconfirm --needed -Ss zsh-doc
420 sudo pacman --noconfirm --needed -S zsh-doc
488 sudo connmanctl disable wifi; sudo connmanctl enable wifi
578 ??sudo n?
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
instead of :
sudo nano /etc/local.d/local.start
the first found of the correct one matches
Please help give hint how it could be and to solve it ?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bug report on a Zsh' widget
2023-05-20 23:03 bug report on a Zsh' widget Budi
@ 2023-05-22 0:30 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2023-05-22 0:30 UTC (permalink / raw)
To: Budi; +Cc: zsh-workers
On Sat, May 20, 2023 at 4:03 PM Budi <budikusasi@gmail.com> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-22 0:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-20 23:03 bug report on a Zsh' widget Budi
2023-05-22 0:30 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).