Bash History
Marius Gedminas
marius at pov.lt
Fri Jun 9 09:39:40 UTC 2006
On Fri, Jun 09, 2006 at 10:31:35AM +0100, Clive Menzies wrote:
> On (09/06/06 11:49), OOzy Pal wrote:
> > in Konsole, I remember long time ago that I can write a letter then
> > click on arrow up or down to navigate through the bash history. Only
> > history that starts with the letter I entered will appear. i.e. if I
> > do:
> >
> > $ apachectl configtest
> > $ rm abc
> > $ ls -a
> > $ ls -l
> > $ rm -fr *
> >
> > then I type r in the konsole and click up/down arrow I can only see
> > the rm abc and rm -fr * commands.
I have this function mapped to PgUp and PgDn. To do that I created a
file called .inputrc in my home directory with the following content:
"\e[5~": history-search-backward
"\e[6~": history-search-forward
I found this tip on
http://linuxart.com/log/archives/2005/10/13/search-history-in-bash/
> > I did this in Mandrake 7.
> >
> > If I am making sense, how can I do this in Ubuntu?
Create an ~/.inputrc file. It is documented by 'man readline' (search for
the INITIALIZATION FILE section).
HTH,
Marius Gedminas
--
(mental note: stop installing red hat. everytime i do so, it takes ages to fix
my system again.)
-- from the sig of Martin Högman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060609/bc99a2ed/attachment.sig>
More information about the ubuntu-users
mailing list