When installed by default, only the names of commands that appear in /bin
, /usr/bin
, etc. are displayed at the end of the tab. The file /usr/bin/git ls-files
missing.
ls-files
is a helper command that you will need to train your shell. Assuming you are using bash, you can run help complete
to find out which commands you can put in your .bashrc
.
If your distribution provides a bash -completion package, you can install it to save a lot of time:
apt-get install bash-completion # on Debian/Ubuntu/etc. yum install bash-completion # on Fedora/Red Hat/etc.
But as manojlds points out, this will not work for less used git commands such as ls-files
, because bash -completion hides them from you. You will need to edit /etc/bash_completion.d/git
to change this.
source share