summary refs log tree commit diff
path: root/bin/fzfez
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2020-05-06 14:40:01 +0200
committerRobert Günzler <r@gnzler.io>2020-05-06 14:40:01 +0200
commitd4d1eaa7ad9b96b710f1541b600ef764212ee7fa (patch)
treedcdb7f6485278cb7778362a7eb0e58d1b92cdfe2 /bin/fzfez
parent0ca054ba6760f51c612669061c465f3c6a365d15 (diff)
bin/fzfez: add support for git-log
Diffstat (limited to 'bin/fzfez')
-rwxr-xr-xbin/fzfez10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/fzfez b/bin/fzfez
index 1191052..5df0741 100755
--- a/bin/fzfez
+++ b/bin/fzfez
@@ -49,6 +49,16 @@ case "$1" in
 			| sed 's#^heads/##'
 		;;
 
+	git-log)
+		git log --color=always --oneline \
+			| $0 \
+				--border --no-sort --ansi \
+				--preview 'echo {} | cut -d\  -f1 | xargs -I% sh -c "git log --color=always -1 --pretty=full %; echo; git diff --color=always %^..%;"' \
+				--preview-window right:50% \
+			| cut -d' ' -f1 \
+			| xargs -i git log -1 --pretty=%H {}
+		;;
+
 	rg)
 		shift
 		rg $@ --files-with-matches \