Add built-in binding for files command to log command

This commit is contained in:
samedamci 2021-08-31 12:34:38 +02:00
parent ad103887ec
commit dec99a2431
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894

View File

@ -1,7 +1,10 @@
#!/bin/sh
CWD="$(dirname "$(readlink -f "$0")")"
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%
--preview="$show_diff" --preview-window=right:55% \
--bind "ctrl-t:execute($CWD/files.sh {1})"