Skip to content

Commit c39a2f1

Browse files
artagnongitster
authored andcommitted
completion: fix remote.pushdefault
When attempting to complete $ git config remote.push<TAB> 'pushdefault' doesn't come up. This is because "$cur" is matched with "remote.*" and a list of remotes are completed. Add 'pushdefault' as a candidate for completion too, using __gitcomp_nl_append (). Signed-off-by: Ramkumar Ramachandra <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 422553d commit c39a2f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,6 +1884,7 @@ _git_config ()
18841884
remote.*)
18851885
local pfx="${cur%.*}." cur_="${cur#*.}"
18861886
__gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "."
1887+
__gitcomp_nl_append "pushdefault" "$pfx" "$cur_"
18871888
return
18881889
;;
18891890
url.*.*)

0 commit comments

Comments
 (0)