git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Aug 16, 2021, 09:10 UTC
Message-ID
<20210816091025.548095-4-felipe.contreras@gmail.com>
In-Reply-To
<20210816091025.548095-1-felipe.contreras@gmail.com>
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 --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
Previous: Felipe ContrerasNext: Felipe Contreras
Message 3 of 5 in “completion: bash: a bunch of fixes”
  1. 0/4 completion: bash: a bunch of fixesFelipe Contreras, Aug 16, 2021
  2. 1/4 completion: bash: fix prefix detection in branch.*Felipe Contreras, Aug 16, 2021
  3. 3/4 completion: bash: fix for multiple dash commandsFelipe Contreras, Aug 16, 2021
  4. 2/4 completion: bash: fix for suboptions with valueFelipe Contreras, Aug 16, 2021
  5. 4/4 completion: bash: add correct suffix in variablesFelipe Contreras, Aug 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.