Add zstyles for git-log formats
This commit is contained in:
parent
5b2dcb8844
commit
3f4d5fac0c
@ -10,6 +10,14 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Log
|
||||||
|
zstyle -s ':prezto:module:git:log:medium' format '_git_log_medium_format' \
|
||||||
|
|| _git_log_medium_format='%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
|
||||||
|
zstyle -s ':prezto:module:git:log:oneline' format '_git_log_oneline_format' \
|
||||||
|
|| _git_log_oneline_format='%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n'
|
||||||
|
zstyle -s ':prezto:module:git:log:brief' format '_git_log_brief_format' \
|
||||||
|
|| _git_log_brief_format='%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n'
|
||||||
|
|
||||||
# Status
|
# Status
|
||||||
zstyle -s ':prezto:module:git:status:ignore' submodules '_git_status_ignore_submodules' \
|
zstyle -s ':prezto:module:git:status:ignore' submodules '_git_status_ignore_submodules' \
|
||||||
|| _git_status_ignore_submodules='none'
|
|| _git_status_ignore_submodules='none'
|
||||||
@ -91,16 +99,12 @@ alias gCt='git checkout --theirs --'
|
|||||||
alias gCT='gCt $(gCl)'
|
alias gCT='gCt $(gCl)'
|
||||||
|
|
||||||
# Log (l)
|
# Log (l)
|
||||||
git_log_format_medium='--pretty=format:%C(bold)Commit:%C(reset) %C(green)%H%C(red)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
|
alias gl='git log --topo-order --pretty=format:${_git_log_medium_format}'
|
||||||
git_log_format_oneline='--pretty=format:%C(green)%h%C(reset) %s%C(red)%d%C(reset)%n'
|
alias gls='git log --topo-order --stat --pretty=format:${_git_log_medium_format}'
|
||||||
git_log_format_brief='--pretty=format:%C(green)%h%C(reset) %s%n%C(blue)(%ar by %an)%C(red)%d%C(reset)%n'
|
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:${_git_log_medium_format}'
|
||||||
|
alias glo='git log --topo-order --pretty=format:${_git_log_oneline_format}'
|
||||||
alias gl='git log --topo-order ${git_log_format_medium}'
|
alias glg='git log --topo-order --all --graph --pretty=format:${_git_log_oneline_format}'
|
||||||
alias gls='git log --topo-order --stat ${git_log_format_medium}'
|
alias glb='git log --topo-order --pretty=format:${_git_log_brief_format}'
|
||||||
alias gld='git log --topo-order --stat --patch --full-diff ${git_log_format_medium}'
|
|
||||||
alias glo='git log --topo-order ${git_log_format_oneline}'
|
|
||||||
alias glg='git log --topo-order --all --graph ${git_log_format_oneline}'
|
|
||||||
alias glb='git log --topo-order ${git_log_format_brief}'
|
|
||||||
alias glc='git shortlog --summary --numbered'
|
alias glc='git shortlog --summary --numbered'
|
||||||
|
|
||||||
# Merge (m)
|
# Merge (m)
|
||||||
|
@ -17,5 +17,5 @@ git fsck 2> /dev/null \
|
|||||||
--date-order \
|
--date-order \
|
||||||
--no-walk \
|
--no-walk \
|
||||||
--stdin \
|
--stdin \
|
||||||
${git_log_format_oneline}
|
--pretty=format:${_git_log_oneline_format}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ git fsck --unreachable 2> /dev/null \
|
|||||||
| grep 'commit' \
|
| grep 'commit' \
|
||||||
| awk '{print $3}' \
|
| awk '{print $3}' \
|
||||||
| git log \
|
| git log \
|
||||||
${git_log_format_oneline} \
|
--pretty=format:${_git_log_oneline_format} \
|
||||||
--extended-regexp \
|
--extended-regexp \
|
||||||
--grep="${1:-(WIP )?[Oo]n [^:]+:}" \
|
--grep="${1:-(WIP )?[Oo]n [^:]+:}" \
|
||||||
--merges \
|
--merges \
|
||||||
|
Reference in New Issue
Block a user