From: Bart Schaefer <schaefer@brasslantern.com>
To: Ahmad Ismail <ismail783@gmail.com>
Cc: Oliver Kiddle <opk@zsh.org>, Zsh Users <zsh-users@zsh.org>
Subject: Re: git diff HEAD - only show modified files in completion
Date: Sat, 17 Oct 2020 15:15:14 -0700 [thread overview]
Message-ID: <CAH+w=7aKjV6Rr7YWN7q98vS7YqxeufpxYyt34WLtE6XSDh24oQ@mail.gmail.com> (raw)
In-Reply-To: <CAHAhJwL5F_Z5X7XacV-hN=GwNJ1iasZmGJZKfX6rLcF_9nXFww@mail.gmail.com>
On Sat, Oct 17, 2020 at 8:24 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> I was thinking there should be some way to implement this with a
> zstyle by changing the program invoked by _call_program
Finally had a chance to poke at this a bit more ...
On Sat, Oct 17, 2020 at 9:25 AM Ahmad Ismail <ismail783@gmail.com> wrote:
>
> I have asked this question on reddit afterwards.
In your post there, you said:
> I also tried zstyle :completion::complete:git-difftool:argument-rest:' command 'git ls-files -m'. Apparently it is doing nothing.
So very close.
zstyle ':completion::complete:git-diff*:argument-rest:tree-files'
command 'git ls-files -m'
One question is why ^Xh (list-tags) shows the "files" tag for that
context but not the "tree-files" tag. If you invoke completion
immediately after "git diff " (instead of after "git diff HEAD ") then
the context is "changed-in-working-tree-files" and THAT gets shown
correctly by ^Xh.
next prev parent reply other threads:[~2020-10-17 22:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 22:48 Ahmad Ismail
2020-10-16 22:16 ` Ahmad Ismail
2020-10-17 8:33 ` Oliver Kiddle
2020-10-17 15:24 ` Bart Schaefer
2020-10-17 16:25 ` Ahmad Ismail
2020-10-17 22:15 ` Bart Schaefer [this message]
2020-10-18 18:23 ` Ahmad Ismail
2020-10-17 12:28 ` Daniel Shahaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7aKjV6Rr7YWN7q98vS7YqxeufpxYyt34WLtE6XSDh24oQ@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=ismail783@gmail.com \
--cc=opk@zsh.org \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).