[PATCH 2/6] completion: add common options for rev-parse
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Jun 2, 2013, 14:03 UTC
- Message-ID
- <1370181822-23450-3-git-send-email-artagnon@gmail.com>
- In-Reply-To
- <1370181822-23450-1-git-send-email-artagnon@gmail.com>
Add support for completing 'git rev-parse'. List only the options that are likely to be used on the command-line, as opposed to scripts.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> --- contrib/completion/git-completion.bash | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 1c35eef..139f48e 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2299,6 +2299,17 @@ _git_reset () __gitcomp_nl "$(__git_refs)" } +_git_rev_parse () +{ + case "$cur" in + --*) + __gitcomp "--show-toplevel --is-inside-work-tree --symbolic-full-name --verify" + return + ;; + esac + __gitcomp_nl "$(__git_refs)" +} + _git_revert () { case "$cur" in
-- 1.8.3.457.g2410d5e