Add log command

This commit is contained in:
samedamci 2021-08-26 22:25:20 +02:00
parent abf39c44d0
commit 90c0714739
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894

7
guzzy/commands/log.sh Executable file
View File

@ -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%