Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: git diff HEAD - only show modified files in completion
- X-seq: zsh-users 26111
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ahmad Ismail <ismail783@xxxxxxxxx>
- Subject: Re: git diff HEAD - only show modified files in completion
- Date: Sat, 17 Oct 2020 15:15:14 -0700
- Archived-at: <https://zsh.org/users/26111>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-10/CAH%2Bw%3D7aKjV6Rr7YWN7q98vS7YqxeufpxYyt34WLtE6XSDh24oQ%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-ot1-f53.google.com) smtp.remote-ip=209.85.210.53; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Oliver Kiddle <opk@xxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BkVLbikO+n968u0mRTv3Qslcqd/QvsxDdkV2nsOh7mo=; b=bRW4wtAa/T+/sDQm5zuNmnPpBvEcmQW6VK6xETYtnyf+V4dRYt4WCIBCm1UuAy/za5 Xyg6SJkxp/1OFTlVT1ntFOR3NAPER4jNSixVGuj547aaFLGjBoCZnuS3mGJpQbvuIHCx K+uStlTA8BuW11c1u3rTm4fsEn58qz6ibjiJ80Trj8cVOJ6AYVtVs0/7mzAIwQ46I19n tP5DED/RXutSLRToNHuVjUZ2jI5s2Jo7DdwxYTdwYwq6KNiaE4/H8pL5gIJ08C3u8sXk gn79c5MPSFIZ47GfhFf4rvqj3xR7isIOQDhodJJcpdIzP8u0VwT9G7HRQmDjL1WqkSfj 4qRQ==
- In-reply-to: <CAHAhJwL5F_Z5X7XacV-hN=GwNJ1iasZmGJZKfX6rLcF_9nXFww@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <CAHAhJwKG1e5tQUeTSv+FqkoCvZq3uX5DEe=t+TUoB3RhWMO-ow@mail.gmail.com> <CAHAhJwLAD04fAMBy-Kwm6WM1uiBg+xr+4-0e9+3c674Xs=GJvQ@mail.gmail.com> <51151-1602923600.276703@fJFe.e1_b.HfoP> <CAH+w=7brPKzeh_KrpL=LZpojttrdRz7DkqLcfHdauqnpQq5sTA@mail.gmail.com> <CAHAhJwL5F_Z5X7XacV-hN=GwNJ1iasZmGJZKfX6rLcF_9nXFww@mail.gmail.com>
- Sender: zsh-users-request@xxxxxxx
On Sat, Oct 17, 2020 at 8:24 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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@xxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author