Skip to content

Commit 04ce893

Browse files
committed
Merge branch 'jk/bash-completion'
* jk/bash-completion: completion: learn about --man-path completion: handle unstuck form of base git options
2 parents 6af9840 + 66fb37d commit 04ce893

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2490,9 +2490,10 @@ __git_main ()
24902490
i="${words[c]}"
24912491
case "$i" in
24922492
--git-dir=*) __git_dir="${i#--git-dir=}" ;;
2493+
--git-dir) ((c++)) ; __git_dir="${words[c]}" ;;
24932494
--bare) __git_dir="." ;;
24942495
--help) command="help"; break ;;
2495-
-c) c=$((++c)) ;;
2496+
-c|--work-tree|--namespace) ((c++)) ;;
24962497
-*) ;;
24972498
*) command="$i"; break ;;
24982499
esac
@@ -2510,6 +2511,7 @@ __git_main ()
25102511
--exec-path
25112512
--exec-path=
25122513
--html-path
2514+
--man-path
25132515
--info-path
25142516
--work-tree=
25152517
--namespace=

t/t9902-completion.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ test_expect_success 'double dash "git" itself' '
365365
--exec-path Z
366366
--exec-path=
367367
--html-path Z
368+
--man-path Z
368369
--info-path Z
369370
--work-tree=
370371
--namespace=

0 commit comments

Comments
 (0)