diff mbox series

[v3,try4,3/4] completion: bash: fix for multiple dash commands

Message ID 20210816091025.548095-4-felipe.contreras@gmail.com (mailing list archive)
State Accepted
Commit f3cc916acc2e0f92c05e07c82c83b370e7d31247
Headers show
Series completion: bash: a bunch of fixes | expand

Commit Message

Felipe Contreras Aug. 16, 2021, 9:10 a.m. UTC
Otherwise options of commands like 'for-each-ref' are not completed.

Tested-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 7aea1abda5..b7988f0485 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-}"