Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: git diff HEAD - only show modified files in completion



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@xxxxxxxxx> 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.
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





Messages sorted by: Reverse Date, Date, Thread, Author