Reputation: 168
Auto-completion in bash (with Tab) works on folders, but not with files.
This is how the bottom part of the .bashrc file looks, with the bash-completion part installed and updated:
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
Any ideas?
Upvotes: 10
Views: 18144
Reputation: 3962
One possible cause for this is a file named !
. Some default bash-completion
setups have a bug when such a file exists. You can remove the file or patch /usr/share/bash-completion/bash_completion
as shown in the bug link.
Upvotes: 0
Reputation: 123410
The third party "bash_completion" package (not to be confused with bash or its native completion) can sometimes be hard to predict.
cd
mplayer
.scp
.If you're ever in a situation where bash_completion isn't being helpful, you can use M-/
(aka Alt + /
) to use bash's native filename completion instead.
If a command is frequently giving you trouble, you can disable bash_completion for this command using complete -r thatcommand
at the end of your .bashrc
.
Upvotes: 22
Reputation: 376
.bashrc file seems ok so the problem probably is in one of the bash_completion files.
I suggest you backup the files and try to replace them with these:
for /etc/bash_completion:
for /usr/share/bash-completion/bash_completion:
that are the standard completion files for ubuntu 13.10. Restart the console before checking if it worked.
Upvotes: 2