Skip to content

Commit 4ea2c97

Browse files
pcloudsgitster
authored andcommitted
completion: simplify _git_notes
This also adds completion for 'git notes remove' and 'git notes edit'. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b475e44 commit 4ea2c97

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

contrib/completion/git-completion.bash

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,19 +1836,11 @@ _git_notes ()
18361836
add,--reedit-message=*|append,--reedit-message=*)
18371837
__git_complete_refs --cur="${cur#*=}"
18381838
;;
1839-
add,--*)
1840-
__gitcomp_builtin notes_add
1841-
;;
1842-
append,--*)
1843-
__gitcomp_builtin notes_append
1844-
;;
1845-
copy,--*)
1846-
__gitcomp_builtin notes_copy
1847-
;;
1848-
prune,--*)
1849-
__gitcomp_builtin notes_prune
1839+
*,--*)
1840+
__gitcomp_builtin notes_$subcommand
18501841
;;
18511842
prune,*)
1843+
# this command does not take a ref, do not complete it
18521844
;;
18531845
*)
18541846
case "$prev" in

0 commit comments

Comments
 (0)