Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
bash completion: add --format= and --oneline options for "git log"
author
Teemu Likonen
<tlikonen@iki.fi>
Tue, 24 Feb 2009 13:33:29 +0000
(15:33 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 27 Feb 2009 19:17:44 +0000
(11:17 -0800)
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>
contrib/completion/git-completion.bash
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
bb93afd
)
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 0a3092f646872867b0060d79c0fd1c85a40e24f4..31608cb79fa00b1987005881a7be11e3f4a0dbc2 100755
(executable)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-1014,6
+1014,11
@@
_git_log ()
" "" "${cur##--pretty=}"
return
;;
" "" "${cur##--pretty=}"
return
;;
+ --format=*)
+ __gitcomp "$__git_log_pretty_formats
+ " "" "${cur##--format=}"
+ return
+ ;;
--date=*)
__gitcomp "
relative iso8601 rfc2822 short local default
--date=*)
__gitcomp "
relative iso8601 rfc2822 short local default
@@
-1029,7
+1034,7
@@
_git_log ()
--follow
--abbrev-commit --abbrev=
--relative-date --date=
--follow
--abbrev-commit --abbrev=
--relative-date --date=
- --pretty=
+ --pretty=
--format= --oneline
--cherry-pick
--graph
--decorate
--cherry-pick
--graph
--decorate
@@
-1541,8
+1546,13
@@
_git_show ()
" "" "${cur##--pretty=}"
return
;;
" "" "${cur##--pretty=}"
return
;;
+ --format=*)
+ __gitcomp "$__git_log_pretty_formats
+ " "" "${cur##--format=}"
+ return
+ ;;
--*)
--*)
- __gitcomp "--pretty=
+ __gitcomp "--pretty=
--format=
$__git_diff_common_options
"
return
$__git_diff_common_options
"
return