Thread (5 messages) 5 messages, 1 author, 2021-08-16

Lifecycle

  1. Posted Felipe Contreras <felipe.contreras@gmail.com>
  2. Tested-by David Aguilar

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

From: Felipe Contreras <hidden>
Date: 2021-08-16 09:10:34
Subsystem: the rest · Maintainer: Linus Torvalds

Otherwise options of commands like 'for-each-ref' are not completed.

Tested-by: David Aguilar <redacted>
Signed-off-by: Felipe Contreras <redacted>
---
 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 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-}"
 
-- 
2.32.0.48.g096519100f
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help