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?

weston
  • 113
  • 3

1 Answers1

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.

Mikel
  • 3,867
  • 2
  • 20
  • 16
  • 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 '11 at 06:18