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

[PATCH try2] completion: zsh: fix file completion regression

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 1, 2020, 00:54 UTC
Message-ID
<20201201005431.57963-1-felipe.contreras@gmail.com>

Turns out we always need to set the ignored prefix (compset) to have similar behavior as in default Bash.

The issue can be seen with:
  git show master:<tab>
Commit 94b2901cfe wrongly removed it.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
This is a regression since the last big chunk of changes.
 contrib/completion/git-completion.zsh | 1 +
 1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index e0fda27f4c..6c56296997 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -116,6 +116,7 @@ __gitcomp_file ()
 {
 	emulate -L zsh
 
+	compset -P '*[=:]'
 	compadd -f -p "${2-}" -- ${(f)1} && _ret=0
 }
 
-- 
2.29.2
Message 1 of 1 in “completion: zsh: fix file completion regression”
  1. completion: zsh: fix file completion regressionFelipe Contreras, Dec 1, 2020

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.