From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: git-completion 1.2 released
Date: Mon, 23 Nov 2020 04:33:59 +0000 [thread overview]
Message-ID: <20201123043359.GC31253@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CAMP44s22L6fAn_hcsnY+7tAWSjZ9L6T9vHOnLboz2G8su6kMgQ@mail.gmail.com>
Felipe Contreras wrote on Sat, Nov 21, 2020 at 18:53:56 -0600:
> On Sat, Nov 21, 2020 at 10:05 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> >
> > Felipe Contreras wrote on Thu, 19 Nov 2020 16:05 +00:00:
> > > Git-completion is a friendly fork of the official Git completion and
> > > prompt scripts for Zsh and Bash.
> > >
> > > The main goal is to provide a more up-to-date completion for Zsh (I'm
> > > the developer), which is basically just a wrapper around the Bash
> > > completion.
> >
> > I was going to invite you to send patches to zsh's own _git, but then I
> > noticed that in README.asciidoc you claim that you've sent patches to
> > zsh's completion and "many" of them have been "ignored":
>
> Git's zsh completion, not Zsh's Git completion.
Thanks for clarifying this.
> > > Compared to Git upstream, you get many benefits for Zsh, for example:
> > > no extra unnecessary spaces, correct auto suffix removal, colors
> > > without PROMPT_COMMAND, custom aliases, fixed --no-options, and many
> > > more.
> >
> > I suspect some of these have been fixed in zsh's _git since you last
> > looked and others are configurable. (E.g., git-send-email(1), which you
> > mention below, completes not only files but also recent commits, and has
> > done so for a while.)
>
> But the main use of "git send-email" is not to receive random files,
> it's to receive comittishes, and potentially some .patch files.
>
So, just this? Will anyone want to complete files that _don't_ have
a .patch extension?
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 81a060e4d..8d1567e39 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4443,7 +4443,7 @@ _git-send-email () {
'--force[send emails even if safety checks would prevent it]' \
'(- *)--dump-aliases[dump configured aliases and exit]' \
'*: : _alternative -O expl
- "files:file:_files"
+ "files:file:_files -g \"*.patch\""
"commits:recent commit object name:__git_commit_objects_prefer_recent"'
}
> If I do "git send-email master..<tab>" nothing completes with Zsh's
> official completion. It does with mine.
Thanks for the bug report.
next prev parent reply other threads:[~2020-11-23 4:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 16:05 Felipe Contreras
2020-11-21 16:03 ` Daniel Shahaf
2020-11-21 20:14 ` Bart Schaefer
2020-11-22 0:59 ` Felipe Contreras
2020-11-22 0:53 ` Felipe Contreras
2020-11-23 4:33 ` Daniel Shahaf [this message]
2020-11-23 7:49 ` Felipe Contreras
2020-11-23 15:44 ` Daniel Shahaf
2020-11-23 18:31 ` Felipe Contreras
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=20201123043359.GC31253@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=felipe.contreras@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).