Re: [PATCH v2 try2 3/4] completion: bash: fix for multiple dash commands
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jun 7, 2021, 19:00 UTC
- Message-ID
- <20210607190046.GB6312@szeder.dev>
- In-Reply-To
- <20210606184726.1018460-4-felipe.contreras@gmail.com>
On Sun, Jun 06, 2021 at 01:47:25PM -0500, Felipe Contreras wrote:
> Otherwise commands like 'for-each-ref' are not completed.
I think you meant that options of commands like 'for-each-ref' are not completed. The command itself can be completed just fine:
$ git for<TAB> for-each-ref format-patch
Show 21 quoted lines
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.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 05606609f9..1feb2ee108 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -421,7 +421,7 @@ __gitcomp_builtin ()
> local incl="${2-}"
> local excl="${3-}"
>
> - local var=__gitcomp_builtin_"${cmd/-/_}"
> + local var=__gitcomp_builtin_"${cmd//-/_}"
> local options
> eval "options=\${$var-}"
>
> --
> 2.31.1.2.g0532ba4bf6
>