Making the command line more powerful - configuration help needed
Colin Watson
cjwatson at ubuntu.com
Sun Oct 30 22:12:51 UTC 2005
On Sun, Oct 30, 2005 at 09:37:29PM +0100, Gábor Iglói wrote:
> I've seen in some of the distros that the bash/terminal is capable of
> a very cool command history search - if I type in the beginning of a
> command and I press PgUp/PgDown I get back to my previously executed
> commands beginning with the typed-in letters.
I think it depends on your terminal, which is probably why we don't
enable it by default, but putting these two lines in ~/.inputrc works
for me in pterm:
"\e[5~": history-search-backward
"\e[6~": history-search-forward
If that doesn't work, run 'cat', press PageUp and PageDown to see what
the keycodes are, and substitute "\e" in place of "\[". For me, PageUp
produces "^[[5~" and PageDown produces "^[[6~", so you should get the
idea from the above.
Cheers,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list