summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-07 08:05:02 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-07 11:02:48 -0800
commit4ea2c974a0ffef18b966be1bb03168c7f10799c1 (patch)
tree1647f17e2a5213750ab06d274268351ae6b6d70f /contrib/completion
parentcompletion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate (diff)
downloadtgif-4ea2c974a0ffef18b966be1bb03168c7f10799c1.tar.xz
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash14
1 files changed, 3 insertions, 11 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0d858cacce..37bf4a64d3 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1836,19 +1836,11 @@ _git_notes ()
add,--reedit-message=*|append,--reedit-message=*)
__git_complete_refs --cur="${cur#*=}"
;;
- add,--*)
- __gitcomp_builtin notes_add
- ;;
- append,--*)
- __gitcomp_builtin notes_append
- ;;
- copy,--*)
- __gitcomp_builtin notes_copy
- ;;
- prune,--*)
- __gitcomp_builtin notes_prune
+ *,--*)
+ __gitcomp_builtin notes_$subcommand
;;
prune,*)
+ # this command does not take a ref, do not complete it
;;
*)
case "$prev" in