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

2 messages from 2018-03-18 to 2018-03-19. Participants: Todd Zullinger, Junio C Hamano.
Thread: https://gitlist.dev/t/48074

## Todd Zullinger, 2018-03-18 04:01

Subject: [PATCH] completion: complete tags with git tag --delete/--verify
Message-ID: <20180318040135.30710-1-tmz@pobox.com>
URL: https://gitlist.dev/e/20180318040135.30710-1-tmz%40pobox.com

```
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(-)

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, 2018-03-19 16:55

Subject: Re: [PATCH] completion: complete tags with git tag --delete/--verify
Message-ID: <xmqqk1u8vwce.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqk1u8vwce.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <20180318040135.30710-1-tmz@pobox.com>

```
Todd Zullinger <tmz@pobox.com> writes:

> 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.

>  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
>  			;;

```
