10 lines
271 B
Plaintext
Raw Normal View History

2020-05-16 20:46:04 +02:00
#!/bin/sh
2020-05-17 11:18:58 +02:00
# Fuzzy Git commit browser.
2020-05-16 20:46:04 +02:00
2020-05-17 11:18:58 +02:00
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%