Add more colors to 'fglog' script

This commit is contained in:
Wiktor Zykubek 2020-05-17 11:18:58 +02:00
parent 4dd4cde14f
commit 1e3cc7a54b
2 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,9 @@
#!/bin/sh
# Fuzzy Git commits browser.
# Fuzzy Git commit browser.
git log --no-decorate --format=short | awk '/^commit|^ /' |
sed 's/ //g; s/commit //g' | paste -d " " - - | fzf --preview \
'git log -n 1 {1}; printf "\n" && git diff --color=always {1}~ {1}'
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%