15 lines
414 B
Plaintext
Raw Permalink Normal View History

2024-10-29 22:57:09 -05:00
function fshow() {
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" \
| fzf --ansi --preview "echo {} \
| grep -o '[a-f0-9]\{7\}' \
| head -1 \
| xargs -I % sh -c 'git show --color=always %'" \
--bind "enter:execute:
(grep -o '[a-f0-9]\{7\}' \
| head -1 \
| xargs -I % sh -c 'git show --color=always % \
| less -R') << 'FZF-EOF'
{}
FZF-EOF"
}