[Bug 1035785] New: in vi line editing mode history-search-backward does not work
http://bugzilla.suse.com/show_bug.cgi?id=1035785 Bug ID: 1035785 Summary: in vi line editing mode history-search-backward does not work Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: msuchanek@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- The PgUp/PgDn are bound to history-search-backward/history-search-forward in /etc/inputrc. In bash after setting "set -o vi" the history search function no longer works. This WorksOnDebian(tm). Actually they have the bindings conditonal on mode=emacs in /etc/inputrc but if you move the bindings outside the conditional they just work. On Leap they are outside of the conditional to start with but are broken. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1035785
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c1
Dr. Werner Fink
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c2
--- Comment #2 from Dr. Werner Fink
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c3
Dr. Werner Fink
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c4
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c5
--- Comment #5 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c6
Dr. Werner Fink
WorksOnDebian(tm) means that whether you set -o emacs or set -o vi the settings in /etc/inputrc just work.
I just use the library. I do not want to know how it accomplishes this internally.
Then show me the result of set -o | grep -E '^(emacs|vi)' bind -P | grep history-search bind -m vi-insert -P | grep history-search bind -m vi-command -P | grep history-search from such a Debian system -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c7
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c8
--- Comment #8 from Dr. Werner Fink
I do not understand why this is needed. The file has this conditional:
$if mode=vi set editing-mode vi set keymap vi $endif
So this conditional is probably supposed to accomplish what you suggest but is broken.
On Debian this conditional is not needed. Any bindings set up in /etc/inputrc are bound in any mode unless they are inside a mode conditional.
The line set editing-mode vi without the surrounding conditional would switch the bash into and any other application into VI editing mode. As said I'll not do this. Therefore please provide the information I have requested -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c9
--- Comment #9 from Dr. Werner Fink
+ . test-bind.sh ++ set -o ++ grep -E '^(emacs|vi)' emacs off vi on ++ grep history-search ++ bind -P history-search-backward can be found on "\e[5~". history-search-forward can be found on "\e[6~". ++ grep history-search ++ bind -m vi-insert -P history-search-backward can be found on "\e[5~". history-search-forward can be found on "\e[6~". ++ grep history-search ++ bind -m vi-command -P history-search-backward is not bound to any keys history-search-forward is not bound to any keys
Attach the /etc/inputrc as well as the ~/.inputrc from this Debian system. Then I can test this on a openSUSE version of libreadline -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c10
--- Comment #10 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c11
Dr. Werner Fink
Created attachment 722550 [details] /etc/inputrc
No ~/.inputrc
And again, I am not requesting that the vi mode is made the default. I am merely requesting that the vi mode is fixed so the bindings apply in it as well.
Obviously the conditional in the SUSE /etc/inputrc is supposed to do that but is broken.
Obviously? Do you have tried to use the Debian /etc/inputrc as personal ~/.inputrc and used export INPUTRC=~/.inputrc bash with this I see werner@boole:~> echo $INPUTRC /suse/werner/Downloads/inputrc.debian werner@boole:~> set -o vi werner@boole:~> bind -P | grep history-search history-search-backward is not bound to any keys history-search-forward is not bound to any keys werner@boole:~> bind -m vi-command -P | grep history-search history-search-backward is not bound to any keys history-search-forward is not bound to any keys werner@boole:~> bind -m vi-insert -P | grep history-search history-search-backward is not bound to any keys history-search-forward is not bound to any keys werner@boole:~> binD no history-search-backward on PageUp ... I'll do a real fix for Tumbleweed but not for Leap nor SLES12 as this is a bit touchy -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c12
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c13
Dr. Werner Fink
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c14
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c15
--- Comment #15 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c16
Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1035785
http://bugzilla.suse.com/show_bug.cgi?id=1035785#c17
--- Comment #17 from Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com