Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My question is about git command tab-completion, i.e. when I type git stat and hit Tab, it completes the command line to git status. (Where applicable, this also works with remote names and branch names.)

What confuses me is that without additional configuration on any of the boxes, on the machine with older git and stable Debian it works, while on the laptop it does not. Shouldn't that be the other way around? Shouldn't the fancy things tend to rather be in testing than stable?

On my VPS, where:

aloism@srv:~$ git --version
git version 1.7.2.5
aloism@srv:~$ lsb_release -a
No LSB modules are available.
Distributor ID:     Debian
Description:        Debian GNU/Linux 6.0.5 (squeeze)
Release:            6.0.5
Codename:           squeeze

and on my laptop:

lennycz@laptop:~$ git --version
git version 1.7.10.4
lennycz@laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID:     Debian
Description:        Debian GNU/Linux testing (wheezy)
Release:            testing
Codename:           wheezy
lennycz@laptop:~$ 

There's nothing interesting in ~/.gitconfig on any of the boxes.

Can anybody explain it? A bug in git? Any more research ideas?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

The reason is that package bash-completion, which enables completion for other packages that add their script to /etc/bash_completion, is not instaled on the laptop.

Shouldn't that be the other way around? Shouldn't the fancy things tend to rather be in testing than stable?

Well, it sounds logical, but Debian kind of breaks this minimalistic principle since Lenny as it installs also recommended pakages by default. You can disable this behavior, though.

Apparently Debian installer does not use this setting for Wheezy, reason being another question.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.