From: Jacob Keller <jacob.keller@gmail.com>
To: Git mailing list <git@vger.kernel.org>
Subject: git blame completion add <rev> completion?
Date: Thu, 12 Apr 2018 15:18:41 -0700 [thread overview]
Message-ID: <CA+P7+xrQhGdifOGVKCqw3bEBp-YVQwNNQiXzvECJfFpMRipu2g@mail.gmail.com> (raw)
Hi,
I use git blame sometimes to blame against specific revisions, i.e.
"git blame <branch> -- <file>" and it would be nice if blame could
figure out how to complete the <branch> or revision reference..
I tried to take a stab at adding support for this, but I couldn't
figure out which completion function to use...
I want "git blame <TAB>" to complete files like normal, (as this is
the most general use case), but to have "git blame xyz<TAB>" to
complete revisions if there's any that match, (while still also
completing files). Additionally, it should only complete a revision
for the first argument, and go back to strict file names after.
In an *ideal* world, it'd be nice if it could figure out say:
git blame <branch> xyz<TAB>
and complete xyz as a file found in branch, not actually checking
local files but the ls-files of that branch instead. (i.e. it should
be able to complete a file that was deleted in the current checkout
but exists on that ref).
any ideas on where to start with that?
Thanks,
Jake
reply other threads:[~2018-04-12 22:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CA+P7+xrQhGdifOGVKCqw3bEBp-YVQwNNQiXzvECJfFpMRipu2g@mail.gmail.com \
--to=jacob.keller@gmail.com \
--cc=git@vger.kernel.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.
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).