summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47e98ee)
raw | patch | inline | side by side (parent: 47e98ee)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 23 Aug 2007 05:42:11 +0000 (01:42 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 23 Aug 2007 05:42:11 +0000 (01:42 -0400) |
I'm often finding that I need to run git-describe on very long
remote tracking branch names, to find out what tagged revision
the remote tracking branch is now at (or not at). Typing out
the ref names is painful, so bash completion on them is a very
useful feature.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
remote tracking branch names, to find out what tagged revision
the remote tracking branch is now at (or not at). Typing out
the ref names is painful, so bash completion on them is a very
useful feature.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
contrib/completion/git-completion.bash | patch | blob | history |
index 8f27aa9a133fdd601a90e10ee280dfa55728bc09..6ed6a51dc6f425ac1d3111fd818473e37adf22fb 100755 (executable)
COMPREPLY=()
}
+_git_describe ()
+{
+ __gitcomp "$(__git_refs)"
+}
+
_git_diff ()
{
__git_complete_file
cherry-pick) _git_cherry_pick ;;
commit) _git_commit ;;
config) _git_config ;;
+ describe) _git_describe ;;
diff) _git_diff ;;
fetch) _git_fetch ;;
format-patch) _git_format_patch ;;
complete -o default -o nospace -F _git_cherry git-cherry
complete -o default -o nospace -F _git_cherry_pick git-cherry-pick
complete -o default -o nospace -F _git_commit git-commit
+complete -o default -o nospace -F _git_describe git-describe
complete -o default -o nospace -F _git_diff git-diff
complete -o default -o nospace -F _git_fetch git-fetch
complete -o default -o nospace -F _git_format_patch git-format-patch
complete -o default -o nospace -F _git_branch git-branch.exe
complete -o default -o nospace -F _git_bundle git-bundle.exe
complete -o default -o nospace -F _git_cherry git-cherry.exe
+complete -o default -o nospace -F _git_describe git-describe.exe
complete -o default -o nospace -F _git_diff git-diff.exe
complete -o default -o nospace -F _git_format_patch git-format-patch.exe
complete -o default -o nospace -F _git_log git-log.exe