threads / patch / 48074

patchcompletion: complete tags with git tag --delete/--verify

Subject: [PATCH] completion: complete tags with git tag --delete/--verify

## tl;dr

2 messages between Mar 18, 2018 and Mar 19, 2018. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Todd Zullinger· Mar 18, 2018, 04:01 UTC · lore

Completion of tag names has worked for the short -d/-v options since 88e21dc746 ("Teach bash about completing arguments for git-tag", 2007-08-31). The long options were not added to "git tag" until many years later, in c97eff5a95 ("git-tag: introduce long forms for the options", 2011-08-28).

Extend tag name completion to --delete/--verify.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to contrib/completion/git-completion.bash +1 −1
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 6da95b8095..c7957f0a90 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2967,7 +2967,7 @@ _git_tag ()
 	while [ $c -lt $cword ]; do
 		i="${words[c]}"
 		case "$i" in
-		-d|-v)
+		-d|--delete|-v|--verify)
 			__gitcomp_direct "$(__git_tags "" "$cur" " ")"
 			return
 			;;
-- 
2.17.0.rc0
Junio C Hamano· Mar 19, 2018, 16:55 UTC · re: Todd Zullinger · lore

Re: [PATCH] completion: complete tags with git tag --delete/--verify

Todd Zullinger <tmz@pobox.com> writes:
Show 10 quoted lines
> Completion of tag names has worked for the short -d/-v options since
> 88e21dc746 ("Teach bash about completing arguments for git-tag",
> 2007-08-31).  The long options were not added to "git tag" until many
> years later, in c97eff5a95 ("git-tag: introduce long forms for the
> options", 2011-08-28).
>
> Extend tag name completion to --delete/--verify.
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
Thanks, makes sense.
Show 16 quoted lines
>  contrib/completion/git-completion.bash | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 6da95b8095..c7957f0a90 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2967,7 +2967,7 @@ _git_tag ()
>  	while [ $c -lt $cword ]; do
>  		i="${words[c]}"
>  		case "$i" in
> -		-d|-v)
> +		-d|--delete|-v|--verify)
>  			__gitcomp_direct "$(__git_tags "" "$cur" " ")"
>  			return
>  			;;

← back to recent threads