From 90c071473944198679949870577ca10b127fc78e Mon Sep 17 00:00:00 2001 From: samedamci Date: Thu, 26 Aug 2021 22:25:20 +0200 Subject: [PATCH] Add log command --- guzzy/commands/log.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 guzzy/commands/log.sh diff --git a/guzzy/commands/log.sh b/guzzy/commands/log.sh new file mode 100755 index 0000000..e788cfb --- /dev/null +++ b/guzzy/commands/log.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +show_diff="git log --color=always -n 1 {1}; seq -s_ 150|tr -d '[:digit:]' && \ + git diff --color=always {1}~ {1}" + +git log --color=always --format="%C(auto)%h %s" | fzf --ansi \ + --preview="$show_diff" --preview-window=right:55%