]> git.ipfire.org Git - thirdparty/git.git/commit
completion: bash: fix for suboptions with value
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 16 Aug 2021 09:10:23 +0000 (04:10 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Aug 2021 18:17:25 +0000 (11:17 -0700)
commite9f2118ddfad4ae5e37adc7637acc9daf4ac8c9c
treea2e76e6f3578becdb0da937d842d07d331305283
parentbf8ae49a8f7d8b6dd87bbea34e6566e8581ab231
completion: bash: fix for suboptions with value

We need to ignore options that don't start with -- as well.

Depending on the value of COMP_WORDBREAKS the last word could be
duplicated otherwise.

Can be tested with:

  git merge -X diff-algorithm=<tab>

Tested-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
t/t9902-completion.sh