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

[PATCH] completion: trivial fix for zsh

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 21, 2013, 00:33 UTC
Message-ID
<1369096383-28733-1-git-send-email-felipe.contreras@gmail.com>

zsh completion wrapper doesn't reimplement __gitcompadd(). Although it should be trivial to do that, let's use __gitcomp_nl() which achieves exactly the same thing, specially since the suffix ($4) has to be empty.

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 a98c2fd..1c35eef 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1831,7 +1831,7 @@ _git_config ()
 		local remote="${prev#remote.}"
 		remote="${remote%.fetch}"
 		if [ -z "$cur" ]; then
-			__gitcompadd "refs/heads/" "" "" ""
+			__gitcomp_nl "refs/heads/" "" "" ""
 			return
 		fi
 		__gitcomp_nl "$(__git_refs_remotes "$remote")"
-- 
1.8.3.rc3.286.g3d43083
Next: Felipe Contreras
Message 1 of 3 in “completion: trivial fix for zsh”
  1. completion: trivial fix for zshFelipe Contreras, May 21, 2013
  2. Felipe ContrerasMay 21, 2013
  3. Junio C HamanoMay 21, 2013

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.