DragonFly BSD
DragonFly kernel List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: bash me, if you like

From: Rahul Siddharthan <rsidd@xxxxxxxxx>
Date: 10 Dec 2003 04:00:29 GMT

Matthew Dillon wrote:
>    Bash (and sh) don't do interactive partial completion history
>    substitution.  At least, I don't think it does.
>            bindkey -k up history-search-backward
>            bindkey -k down history-search-forward

You can do that in bash by putting the following in .inputrc

"\ep": history-search-backward
"\en": history-search-forward

(well, that binds to alt-p and alt-n, or esc p and esc n, I forget the
key bindings for arrow keys, but it should be easily found.)

As a bonus, you get the same key bindings in other readline-aware
applications, like gdb, octave, clisp etc.  

By default (more or less), bash and other readline applications have
^R and ^F for incremental reverse/forward history search, it works
slightly differently but easy to get used to.  But I use the above
because I moved from tcsh to bash.


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