]> git.99rst.org Git - git.git/commitdiff
completion: bash: fix for multiple dash commands
authorFelipe Contreras <redacted>
Mon, 16 Aug 2021 09:10:24 +0000 (04:10 -0500)
committerJunio C Hamano <redacted>
Wed, 18 Aug 2021 18:17:25 +0000 (11:17 -0700)
Otherwise options of commands like 'for-each-ref' are not completed.

Tested-by: David Aguilar <redacted>
Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/completion/git-completion.bash

index 05606609f97bd623a21664d1820cab33964a8863..1feb2ee1081a4e1ae292e19ec3a213bf9631b81c 100644 (file)
@@ -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-}"
 
git clone https://git.99rst.org/PROJECT