bash completion in msysgit by single or double tab

1

1

Single tab used to make bash complete current line, and double tab shown all possible variants.

For example, if I have files (or git branches, or whatever is suitable in current context) "abc", "abd" and "bbb", then if I type "git add a" console will look like that:

// start
id@IDANILOV /d/temp
$ git add a

Then I press tab - it completes current line to "ab" and does not print anything else:

// after tab pressing
id@IDANILOV /d/temp
$ git add ab

If I press tab second time - it shows "abc" and "abd":

// after second tab press
id@IDANILOV /d/temp
$ git add ab
abc  abd

id@IDANILOV /d/temp
$ git add ab

But after some update (or maybe I did something inadvertently) - it shows all variants even after first tab press, which is annoying.

Where this behavior could be changed?

Ivan Danilov

Posted 2015-04-21T14:36:02.753

Reputation: 430

Answers

3

In some inputrc file (/etc/inputrc, ~/.inputrc, ...) there is a line like:

set show-all-if-ambiguous on 

Remove this line, insert # at beginning of line or change on to off.

Alternatively put

bind 'set show-all-if-ambiguous off'

into your .bashrc

Reference: http://tiswww.case.edu/php/chet/readline/rluserman.html#SEC9

T S

Posted 2015-04-21T14:36:02.753

Reputation: 145

I am on windows so I needed to put bind 'set show-all-if-ambiguous off' in my Users\user.bash_profile – Mr_and_Mrs_D – 2015-06-11T15:55:05.087