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

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

flat view
STALE1881d REVIEWED: 1 (0M)

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

Revision v3 of 8 in this series; 1 review trailer.

Revisions (8)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v2 [diff vs current]
  4. v2 [diff vs current]
  5. v3
  6. v4 [diff vs current]
  7. v5 [diff vs current]
  8. v3 current
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