summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-03-05 15:41:43 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-03-05 15:41:43 -0800
commit458eaf5bf895c2df8e0ef81a4c9606d179082e68 (patch)
tree650130c954c3e7fc5a123106b845b9813d1ed1c3 /contrib
parentMerge branch 'jk/sane-relative-time' (diff)
parentbash completion: add --format= and --oneline options for "git log" (diff)
downloadtgif-458eaf5bf895c2df8e0ef81a4c9606d179082e68.tar.xz
Merge branch 'ns/pretty-format'
* ns/pretty-format: bash completion: add --format= and --oneline options for "git log" Add tests for git log --pretty, --format and --oneline. Add --oneline that is a synonym to "--pretty=oneline --abbrev-commit" Give short-hands to --pretty=tformat:%formatstring Add --format that is a synonym to --pretty
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 90ba428e94..f234c34304 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1018,6 +1018,11 @@ _git_log ()
" "" "${cur##--pretty=}"
return
;;
+ --format=*)
+ __gitcomp "$__git_log_pretty_formats
+ " "" "${cur##--format=}"
+ return
+ ;;
--date=*)
__gitcomp "
relative iso8601 rfc2822 short local default
@@ -1033,7 +1038,7 @@ _git_log ()
--follow
--abbrev-commit --abbrev=
--relative-date --date=
- --pretty=
+ --pretty= --format= --oneline
--cherry-pick
--graph
--decorate
@@ -1545,8 +1550,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