1

I try to do this:

cd ~git\t

where the \t is tab character and I expect it to be expanded by bash_completion to this:

cd ~gitolite/

but it doesn't. I've uncommented the following lines in /etc/bash.bashrc and logged out and back in.

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

What gives?

1 Answer 1

0

You probably have:

complete -d cd

try running this:

complete -o bashdefault -d cd

then try your cd ~git\t again.

If that works, add complete -o bashdefault -d cd to your ~/.bashrc, or wherever you put your configs for bash.

1
  • That command did the trick, as long as I have it execute after bash_completion is sourced. I put it at the end of /etc/bash.bashrc with bash_completion enabled above it, then I had to comment out the bash_completion in ~/.bashrc, so now it will work for all users. Cheers!
    – weston
    Feb 11, 2011 at 6:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .