threads / patch / 33880

patchcompletion: trivial fix for zsh

Subject: [PATCH] completion: trivial fix for zsh

## tl;dr

3 messages between May 21, 2013 and May 21, 2013. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Felipe Contreras· May 21, 2013, 00:33 UTC · lore

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(-)
Show changes to contrib/completion/git-completion.bash +1 −1
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
Felipe Contreras· May 21, 2013, 00:38 UTC · re: Felipe Contreras · lore

Re: [PATCH] completion: trivial fix for zsh

On Mon, May 20, 2013 at 7:33 PM, Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 5 quoted lines
> 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>

This is probably v1.8.3 material, I just noticed it's probably a regression introduced by 1ce23aa (completion: add new __gitcompadd helper).

-- 
Felipe Contreras
Junio C Hamano· May 21, 2013, 16:28 UTC · re: Felipe Contreras · lore

Re: [PATCH] completion: trivial fix for zsh

Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 11 quoted lines
> On Mon, May 20, 2013 at 7:33 PM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>> 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>
>
> This is probably v1.8.3 material, I just noticed it's probably a
> regression introduced by 1ce23aa (completion: add new __gitcompadd
> helper).

Great. That is not in v1.8.2.X, but was already in v1.8.3-rc0, so we would need to do something about it.

I am not very happy about the latter "probably", though. If it is a regression, at this late in the cycle, it is often safer to revert the original.

Will apply directly to 'master'.  Thanks.

← back to recent threads