under Debians BASH I can do the following:
foo=/path/to/some/file
cat $f[TAB]
As you can see, I can autocomplete the variable $foo by pressing TAB.
Under Ubuntu (11) the behaviour is not the same (I’ve activated ‘/etc/bash_completion’ in my bashrc).
This is working:
echo $f[TAB]
This one is not working:
cat $f[TAB]
Can anyone give me a hint, how to get the last one working?
You can remove the completion specification provided for
catby/etc/bash_completionby doing:or you can see if modifying the completion options provided in
/etc/bash_completionwork in the version of Bash you’re using:If you’re using the latest patched version of Bash 4.2, there is an option that may help (I haven’t tried it):