zsh:glog: Pipe preview through diff-so-fancy
This commit is contained in:
@@ -27,8 +27,6 @@ local format=(
|
|||||||
' %s%Creset' # bold white subject
|
' %s%Creset' # bold white subject
|
||||||
' ' # space is here so that the empty line is not eaten when empty body
|
' ' # space is here so that the empty line is not eaten when empty body
|
||||||
'%-b' # body
|
'%-b' # body
|
||||||
'--------------------------------------------------'
|
|
||||||
''
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Before being able to operate on the string itself we need to remove all ansi
|
# Before being able to operate on the string itself we need to remove all ansi
|
||||||
@@ -55,7 +53,8 @@ local -a fzf_args=(
|
|||||||
"--preview" "
|
"--preview" "
|
||||||
out=\"\$(echo {} | sed -Ee \"$del_ansi\" -e \"$commit_hash\")\"
|
out=\"\$(echo {} | sed -Ee \"$del_ansi\" -e \"$commit_hash\")\"
|
||||||
if [ \"\$out\" ]; then
|
if [ \"\$out\" ]; then
|
||||||
git show \"${(j:%n:)format}\" \"$date\" $colors \"\$out\"
|
git show \"${(j:%n:)format}\" \"$date\" $colors \"\$out\" \
|
||||||
|
| diff-so-fancy
|
||||||
fi
|
fi
|
||||||
"
|
"
|
||||||
# Reverse the layout so that the newest commit is at the top.
|
# Reverse the layout so that the newest commit is at the top.
|
||||||
|
|||||||
Reference in New Issue
Block a user