How to fix git autocomplete in Ubuntu 13.04
7,003
I had the same problem with Ubuntu 13.04
This is how I solved it
To get bash completion you need to reinstall git-core along with bash-completion package and then restart your bash shell
sudo apt-get install git-core bash-completion
Once successfully installed , just run
bash
By doing so new commands gets initialized in auto completion and it will start working .
Hope this helps
Author by
pcu
Updated on September 18, 2022Comments
-
pcu over 1 year
In previous version of Ubuntu 12.10 when using
git
from command line autocomplete of commands, branches, tags... worked. After installing fresh Ubuntu 13.04 and git it does not work. What to set up to make it work again?Edited
Git is installed using
apt-get install git
. When I enter:git i
and press Tab nothing happens.
init
is not completed.-
gertvdijk almost 11 yearsDo you have the package
bash-completion
installed? If so, the packagegit
should provide/etc/bash_completion.d/git
which will aid in the bash completion. (Log out and log back in after installation to enable the environment adapt to the new files installed.) If this fixes your issue, then I'll write this as an answer. -
pcu almost 11 yearsyes it is installed - bash-completion is already the newest version
-
gertvdijk almost 11 yearsOkay, obvious things excluded then. Are you running as
root
or as a regular user account? Did you install git from the Ubuntu package (software centre or APT) or using another method? Doesgit ini
+TAB
get completed togit init
? Please include all additional information in your question by editing it. This is a Q&A site, not a discussion forum, you see. :) -
nush over 10 years@gertvdijk might be right. Try this: stackoverflow.com/a/18898614/394589 for your user
-
Aravind.HU over 10 years@pcu Its really a common problem faced , I could some how solve it , and I have also posted the same , please check if this solves your problem .
-
-
Himanshu dua about 7 yearsNot worked for me
-
Matthis Kohli almost 5 yearsIt works for Ubuntu 16.04 as well. The
bash
is indeed important.