4 ms·
Add this to your .bashrc to have much more intelligent tab-completion: case $- in *i*) [[ -f /etc/bash_completion ]] && . /etc/bash_completion ;; esac
by apu 17y ago
Add this to your .bashrc to have much more intelligent tab-completion:
case $- in
*i*) [[ -f /etc/bash_completion ]] && . /etc/bash_completion ;;
esac
In addition to the usual filename completions, this will do command-dependent completions. A small sampling:
ssh: tabs complete hostnames in your ~/.ssh/config file
/etc/init.d/*: tabs complete possible options for any script in your init.d directory (at least on debian/ubuntu)
most standard linux commands: type the command and then - and then tabs will show you the list of possible options for that command.
kill/renice/pkill: tabs show you list of process ids/names