To go up the Bash history with <Page Up>
Just a stupid question for my knowledge. I love that feature of the SuSe distribution that allows to fetch all the instruction in .bash_history that startx with the few characters typed in shell followed with <Page Up>. I hope to have myself understood. This feature does not exist in other distributions like Debian. Question is: in what script is this feature encoded? It does not look to be in ~/.bashrc and what is the configuration line? -- Alain Barthélemy cassandre@bartydeux.be http://www.bartydeux.be Linux User #315631
Thu, 02 Feb 2006, by cassandre@bartydeux.be:
Just a stupid question for my knowledge. I love that feature of the SuSe distribution that allows to fetch all the instruction in .bash_history that startx with the few characters typed in shell followed with <Page Up>. I hope to have myself understood. This feature does not exist in other distributions like Debian.
Question is: in what script is this feature encoded? It does not look to be in ~/.bashrc and what is the configuration line?
It's not a script, it's the search function of readline (the function in your shell that reads the commands and lets you edit a command-line). Ctrl-R <argument> searches backwards through the history. See bash(1) Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 9.2 + Jabber: muadib@jabber.xs4all.nl Kernel 2.6.8 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply.
Am Donnerstag, 2. Februar 2006 23:14 schrieb Theo v. Werkhoven:
Thu, 02 Feb 2006, by cassandre@bartydeux.be:
Just a stupid question for my knowledge. I love that feature of the SuSe distribution that allows to fetch all the instruction in .bash_history that startx with the few characters typed in shell followed with <Page Up>. I hope to have myself understood. This feature does not exist in other distributions like Debian.
Question is: in what script is this feature encoded? It does not look to be in ~/.bashrc and what is the configuration line?
It's not a script, it's the search function of readline (the function in your shell that reads the commands and lets you edit a command-line). Ctrl-R <argument> searches backwards through the history. See bash(1)
To use the pageUp and Pagedown-Feature you need these lines in your /etc/inputrc or ~/.inputrc "\e[1~": beginning-of-line "\e[2~": yank "\e[3~": delete-char "\e[4~": end-of-line "\e[5~": history-search-backward "\e[6~": history-search-forward $if term=xterm "\e[2;5~": yank "\e[3;5~": delete-char "\e[5;5~": history-search-backward "\e[6;5~": history-search-forward $endif Important are the history-search-* lines. I just can't test in actually. It would be nice to hear wether it really works. Oliver
Le vendredi 03 février 2006, 08:31:23 ou environ Oliver Wittenburg <oliver.wittenburg@wb-it.de> a écrit:
Am Donnerstag, 2. Februar 2006 23:14 schrieb Theo v. Werkhoven:
Thu, 02 Feb 2006, by cassandre@bartydeux.be:
Just a stupid question for my knowledge. I love that feature of the SuSe distribution that allows to fetch all the instruction in .bash_history that startx with the few characters typed in shell followed with <Page Up>. I hope to have myself understood. This feature does not exist in other distributions like Debian.
Question is: in what script is this feature encoded? It does not look to be in ~/.bashrc and what is the configuration line?
It's not a script, it's the search function of readline (the function in your shell that reads the commands and lets you edit a command-line). Ctrl-R <argument> searches backwards through the history. See bash(1)
To use the pageUp and Pagedown-Feature you need these lines in your /etc/inputrc or ~/.inputrc
"\e[1~": beginning-of-line "\e[2~": yank "\e[3~": delete-char "\e[4~": end-of-line "\e[5~": history-search-backward "\e[6~": history-search-forward $if term=xterm "\e[2;5~": yank "\e[3;5~": delete-char "\e[5;5~": history-search-backward "\e[6;5~": history-search-forward $endif
Important are the history-search-* lines.
I just can't test in actually. It would be nice to hear wether it really works.
Oliver
Yes it works! -- Alain Barthélemy cassandre@bartydeux.be http://www.bartydeux.be Linux User #315631
participants (3)
-
Alain Barthélemy
-
Oliver Wittenburg
-
Theo v. Werkhoven