[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Page-up/Page-down keys and shell history

On Sat, 5 May 2001, Joost van der Lugt wrote:

> Hi all,
> I've been looking into this for a litle bit and am unable to find an
> answer. This is a feature AFAIK only implemented by SuSE:
> At a prompt type one or more characters then use Page Up/Page Down
> to scroll through all commands that started with these characters.
> So typing:
> cd 
> would then give a 'scrollable' list of anything that started with cd
> simply hit enter when you reach the command you were looking for.
> I know Ctrl-r and am familiar with ! but they are not as nice, and
> really not the same.
> Would anybody have a clue as to how this could be implemented?
> I don't think it is shell dependent, so I don't think it's a bash
> option but I could very well be wrong.
> (Tried the dotfile generator, but don't see anything there)
> The option is _really_ addictive therefor my post:)
> Thanks,
> --
> Cheers,
> Joost van der Lugt
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Try this in your .~/inputrc :-
# set show-all-if-ambiguous	On
"\e[1~": beginning-of-line
"\e[3~": delete-char
"\e[4~": end-of-line

# Invoke these to implement 4DOS style command search using Home and End keys
"\e[B": history-search-forward
"\e[A": history-search-backward

This worked flawlessly in potato, but is messy in sid.  No, I don't know
why, but I would like any hints on how to fix it.

Lindsay Allen   <allen@cleo.murdoch.edu.au>    Perth, Western Australia
voice +61 8 9316 2486, 0403 272 564   32.0125S 115.8445E   Debian Linux

Reply to: