Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _git: Complete files after 'reset' when there are no commits, when the 'verbose' style is set.
- X-seq: zsh-workers 41494
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _git: Complete files after 'reset' when there are no commits, when the 'verbose' style is set.
- Date: Sun, 06 Aug 2017 17:01:10 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Yvnf5H Q56jBEKODuGByhHzNSJNUFToWCW8phH98VSZ8=; b=hzSuIqwkeoieoJQk3grV// pB1YzgASY1gZpxymNAlEldRSvozIyvFXMqtsoZhBh7YEOokfr/vhsUiwnJIF9xCH MdIxUeD+8KwJllIKEmO1gaBYtHlNON38QYHESBaeC0XjkzQ6LrggeNaAiRW/1C/M E02CB0LEKB8zm+vHdzG6J2zfBhR4Wgq5XXshLmssdGCD70mldQ48jHTfdIvVoUsN 1SYA6v5xwyNV7E0fU3T0vBmIZ3TdFb34EFk6AKSEHy48JQ78UT/ZOoR4IZHWSG/h 2gqQGTRLL7rVKGvTMnOBKuoowbq6zLymKYQOhETBAKswgUUBGN8C1PG20nvPpyHw ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Yvnf5H Q56jBEKODuGByhHzNSJNUFToWCW8phH98VSZ8=; b=pOk2XntxGh7CR2xhwe4eNW ryJ3joY/c+BoslrVne1BMHO2q6JhOOmhHluyrIWDsdmv8YNzJfsatg3Vhj1vO3nx XgMfD8jdB30EjAG+k6TWGRj4VmQmwPMOMyNllst34nrxA5E2ppEn90CmbEl40Xfz N5vNQ4vCh6U1laFo/8m3AfjKLm4N9vmX45dM3MOkvK1jN8U+7BQQ1yeFnmbRcxgF gJx+sZBKhnp+pyhhvoVMU5Zxmo2D3Q7wk8zFimK1Oi0vwIkaCxxAkUXYbvbU/ML7 lXRRtD890GCsFFm0psOZJ+jBQPDvilcVpCUBLOSg0QwXHBqEDzTXSw8i6/0U5V1w ==
- In-reply-to: <14081.1501971067@thecus.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170731005933.18904-1-danielsh@tarpaulin.shahaf.local2> <14081.1501971067@thecus.kiddle.eu>
Oliver Kiddle wrote on Sun, 06 Aug 2017 00:11 +0200:
> On 31 Jul, Daniel Shahaf wrote:
> > +++ b/Completion/Unix/Command/_git
> > @@ -1462,6 +1462,12 @@ _git-reset () {
> > case $state in
> > (file)
> > local tree=HEAD
> > + if zstyle -t :completion:${curcontext}: verbose; then
> > + if ! _call_program headed git rev-parse --verify HEAD 2>/dev/null; then
>
> Was this supposed to assign the output of git rev-parse to $tree
>
No, it was not. I wanted to check whether HEAD refers to a commit, and
for that, only the command's exit value matters.
> because this is currently spewing the hash into the terminal?
The code would be correct either with the assignment you implemented, or
with additionally redirecting stdout to /dev/null.
> Note _call_program should do the stderr redirection for you.
>
*nod*. I didn't test without the 2>/dev/null redirection.
> Patch below does this and adds a few new options for git 2.14.
Thanks for fixing.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author