From f69efff5c05d94fddfcfd1c392b50d1b2ba0d119 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Thu, 24 Sep 2020 03:30:53 +0200 Subject: [PATCH] zsh:glog: Pipe preview through diff-so-fancy --- .config/zsh/autoload/glog | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/zsh/autoload/glog b/.config/zsh/autoload/glog index 1acb94e..fdf617c 100755 --- a/.config/zsh/autoload/glog +++ b/.config/zsh/autoload/glog @@ -27,8 +27,6 @@ local format=( ' %s%Creset' # bold white subject ' ' # space is here so that the empty line is not eaten when empty body '%-b' # body - '--------------------------------------------------' - '' ) # Before being able to operate on the string itself we need to remove all ansi @@ -55,7 +53,8 @@ local -a fzf_args=( "--preview" " out=\"\$(echo {} | sed -Ee \"$del_ansi\" -e \"$commit_hash\")\" if [ \"\$out\" ]; then - git show \"${(j:%n:)format}\" \"$date\" $colors \"\$out\" + git show \"${(j:%n:)format}\" \"$date\" $colors \"\$out\" \ + | diff-so-fancy fi " # Reverse the layout so that the newest commit is at the top.