mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 15:26:16 -04:00
Reset color in git format after each line so next line does not get affected
This commit is contained in:
parent
1397e6904b
commit
0e7399ce15
|
|
@ -52,7 +52,7 @@ function forgit::log -d "git commit viewer"
|
|||
set graph ""
|
||||
end
|
||||
|
||||
eval "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $argv $forgit_emojify" |
|
||||
eval "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' $argv $forgit_emojify" |
|
||||
env FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
|
||||
end
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ function forgit::rebase -d "git rebase "
|
|||
else
|
||||
set graph ""
|
||||
end
|
||||
set cmd "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $argv $forgit_emojify"
|
||||
set cmd "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' $argv $forgit_emojify"
|
||||
|
||||
set files (echo $argv | sed -nE 's/.* -- (.*)/\1/p')
|
||||
set preview "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_show_pager"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ forgit::log() {
|
|||
"
|
||||
graph=--graph
|
||||
[[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
|
||||
eval "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $* $forgit_emojify" |
|
||||
eval "git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' $* $forgit_emojify" |
|
||||
FZF_DEFAULT_OPTS="$opts" fzf --preview="$cmd"
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ forgit::rebase() {
|
|||
local cmd preview opts graph files
|
||||
graph=--graph
|
||||
[[ $FORGIT_LOG_GRAPH_ENABLE == false ]] && graph=
|
||||
cmd="git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $* $forgit_emojify"
|
||||
cmd="git log $graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr%Creset' $* $forgit_emojify"
|
||||
files=$(sed -nE 's/.* -- (.*)/\1/p' <<< "$*") # extract files parameters for `git show` command
|
||||
preview="echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_show_pager"
|
||||
opts="
|
||||
|
|
|
|||
Loading…
Reference in a new issue