zsh-users
 help / color / mirror / code / Atom feed
From: Ahmad Ismail <ismail783@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: git diff HEAD - only show modified files in completion
Date: Sat, 17 Oct 2020 04:16:15 +0600	[thread overview]
Message-ID: <CAHAhJwLAD04fAMBy-Kwm6WM1uiBg+xr+4-0e9+3c674Xs=GJvQ@mail.gmail.com> (raw)
In-Reply-To: <CAHAhJwKG1e5tQUeTSv+FqkoCvZq3uX5DEe=t+TUoB3RhWMO-ow@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1066 bytes --]

Hi All,

I think it is not showing the screenshot or something. So, I asked the
question in stackoverflow.
https://stackoverflow.com/questions/64381142/append-the-output-of-a-command-as-suggestion-to-existing-competion

I think I have to use:

_git-diff 2>/dev/null
functions[_git-diff-orig]=$functions[_git-diff]

_git-diff() {
    _git-diff-orig "$@"
    ...
}

To extend the _git-diff. However, I am not understanding what to write
there so that it shows *Completing Modified Files *which I expect to be the
output of git ls-files -m

Please help me out here.

*Thanks and Best Regards,Ahmad Ismail*


On Fri, Oct 16, 2020 at 4:48 AM Ahmad Ismail <ismail783@gmail.com> wrote:

> Hi All,
>
> You can see from the following screenshot that my `git ls-files -m` output
> is only `book-urls.txt`. I mean it is the only modified file.
> *[image: Screenshot-2020-10-16-04:40:30.png]*
> Now on top of `Completing tree file` (which list all the files) I want to
> place `Completing modified files`.
> How can I do that?
>
>
> *Thanks and Best Regards,Ahmad Ismail*
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3797 bytes --]

[-- Attachment #2: Screenshot-2020-10-16-04:40:30.png --]
[-- Type: image/png, Size: 87938 bytes --]

  reply	other threads:[~2020-10-16 22:17 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 [this message]
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
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='CAHAhJwLAD04fAMBy-Kwm6WM1uiBg+xr+4-0e9+3c674Xs=GJvQ@mail.gmail.com' \
    --to=ismail783@gmail.com \
    --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).