Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: git completion - pass on --git-dir option
- X-seq: zsh-workers 39648
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: git completion - pass on --git-dir option
- Date: Sun, 16 Oct 2016 00:54:15 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=yV4Vu50mCbbV1eHPH9ErDTc0jHs=; b=aj0OBX ayZKOpvcU4w4mxhdMbi2xBetJzMxWoTWKY6XBObZ2o3VfHnCcCnC+eS9y52Rgls8 cwbpKwDnvUm9MgaiuQ+OaAwzdVgiWPXzWEbvy3gEjVgbBd0gKjK6HfmE5dMFrLg2 G/+JmORvYHtnd4UYLTl8XxMkDYkoGVOlruJCE=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=yV4Vu50mCbbV1eHPH9ErDTc0jHs=; b=RWx42 B0rJAuYf2xx3ISdKvYDCycgkFA2wDpMIaDgjjKY7wkXw3amv/nRwD/72DOXC3Pla 0nmEXu7U3vWsZkmsN82KckzRAgJqPspmM4uAeYAc/ugb4UMNar7D7eyJNMpRbP6W ButA3lassT2Mcb7tHsWbjo8JGyYEfJSUVTloS8=
- In-reply-to: <20161004172623.GA28109@fujitsu.shahaf.local2>
- 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: <80219.1475219575@hydra.kiddle.eu> <20161004172623.GA28109@fujitsu.shahaf.local2>
Daniel Shahaf wrote on Tue, Oct 04, 2016 at 17:26:23 +0000:
> Oliver Kiddle wrote on Fri, Sep 30, 2016 at 09:12:55 +0200:
> > Various aspects of git completion don't work if the option --git-dir is
> > used. This solves that by putting the value in $GIT_DIR.
> >
> > +++ b/Completion/Unix/Command/_git
> > @@ -7484,7 +7484,7 @@ _git() {
> > + (( $+opt_args[--git-dir] )) && local -x GIT_DIR=$opt_args[--git-dir]
>
> Also for --work-tree/GIT_WORK_TREE?
This matters for diff-files.
> There are other --option/ENVVAR pairs in git(1), but I don't know
> whether it is important for them to get this treatment too.
-C would also be useful. Given that it can be passed multiple times,
I think the best approach would be to define a local array in _git that
contains all the -C/--work-tree/--git-dir/--et-cetera options and their
arguments from the command-line, and pass it to various _call_program
invocations later in the file.
I don't plan to do this, though; I got quite enough on my plate right now.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author