]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/completion/git-completion.bash
Teach bash about completing arguments for git-tag
authorShawn O. Pearce <spearce@spearce.org>
Sat, 1 Sep 2007 03:47:01 +0000 (23:47 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 1 Sep 2007 03:47:01 +0000 (23:47 -0400)
commit88e21dc7461dca1ebc70d8579bcc9246364511ee
tree36bb1aa535ccec8ff6503fcebf8a6aee9bb801c5
parente340d7d3fa1c5b9a6e7af2e3ee3d526064e56bea
Teach bash about completing arguments for git-tag

Lately I have been doing a lot of calls to `git tag -d` and also to
`git tag -v`.  In both such cases being able to complete the names
of existing tags saves the fingers some typing effort.  We now look
for the -d or -v option to git-tag in the bash completion support
and offer up existing tag names as possible choices for these.

When creating a new tag we now also offer bash completion support
for the second argument to git-tag (the object to be tagged) as this
can often be a specific existing branch name and is not necessarily
the current HEAD.

If the -f option is being used to recreate an existing tag we now
also offer completion support on the existing tag names for the
first argument of git-tag, helping to the user to reselect the
prior tag name that they are trying to replace.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
contrib/completion/git-completion.bash