[PATCH v2 4/4] completion: more subcommands in _git_notes()
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- Mar 7, 2018, 01:05 UTC
- Message-ID
- <20180307010504.9289-5-pclouds@gmail.com>
- In-Reply-To
- <20180307010504.9289-1-pclouds@gmail.com>
Two subcommands are added for completion: merge and get-ref. get-ref is more like plumbing. But since it does not share the prefix with any other subcommands, it won't slow anybody down.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- contrib/completion/git-completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index dc3ec43b65..2e30950299 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1815,7 +1815,7 @@ _git_name_rev () _git_notes () { - local subcommands='add append copy edit list prune remove show' + local subcommands='add append copy edit get-ref list merge prune remove show' local subcommand="$(__git_find_on_cmdline "$subcommands")" case "$subcommand,$cur" in @@ -1838,7 +1838,7 @@ _git_notes () *,--*) __gitcomp_builtin notes_$subcommand ;; - prune,*) + prune,*|get-ref,*) # this command does not take a ref, do not complete it ;; *)
-- 2.16.2.785.g429c04a1b9