PDA

View Full Version : Question about bash completion


Guest1234
February 25th, 2006, 12: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?

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

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

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

Guest1234
March 3rd, 2006, 09:43 AM
Thanks guys it worked :)