aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTeemu Likonen <tlikonen@iki.fi>2009-02-24 15:33:29 +0200
committerJunio C Hamano <gitster@pobox.com>2009-02-27 11:17:44 -0800
commit72de29c24f50dccc5f045a7756bb0b47e34a7a8e (patch)
tree4aa5c77371d078906feb090276634f5fe706e34d /contrib
parentbb93afd5153948e58d6b09c86e7c106a65dbfb65 (diff)
downloadgit-72de29c24f50dccc5f045a7756bb0b47e34a7a8e.tar.gz
git-72de29c24f50dccc5f045a7756bb0b47e34a7a8e.tar.xz
bash completion: add --format= and --oneline options for "git log"
We also add --format= completion for "git show". Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash14
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0a3092f64..31608cb79 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1014,6 +1014,11 @@ _git_log ()
" "" "${cur##--pretty=}"
return
;;
+ --format=*)
+ __gitcomp "$__git_log_pretty_formats
+ " "" "${cur##--format=}"
+ return
+ ;;
--date=*)
__gitcomp "
relative iso8601 rfc2822 short local default
@@ -1029,7 +1034,7 @@ _git_log ()
--follow
--abbrev-commit --abbrev=
--relative-date --date=
- --pretty=
+ --pretty= --format= --oneline
--cherry-pick
--graph
--decorate
@@ -1541,8 +1546,13 @@ _git_show ()
" "" "${cur##--pretty=}"
return
;;
+ --format=*)
+ __gitcomp "$__git_log_pretty_formats
+ " "" "${cur##--format=}"
+ return
+ ;;
--*)
- __gitcomp "--pretty=
+ __gitcomp "--pretty= --format=
$__git_diff_common_options
"
return