View Full Version : Question about bash completion

February 25th, 2006, 05:03 PM
In my office I have tcsh and if for example I typed the following commands(in this order):

find . --max-depth 1 -type f -exec rm \{} \;
ls programming

and then I type:
"fi" and then the up key then it will complete to "find . --max-depth 1 -type f -exec rm \{} \;"

on bash in my ubuntu if I type the "fi" and then the up key it will complete me to "ls programming" since its the most recent command.

How do I configure my bash to act like tcsh in this matter?

February 25th, 2006, 05:20 PM
add this to your ~/.inputrc :

"\e[A": history-search-backward
"\e[B": history-search-forward

jerome bettis
February 25th, 2006, 09:08 PM
if you type !xyz it will do the most recent command that starts with xyz

March 3rd, 2006, 02:43 PM
Thanks guys it worked :)