Add more colors to 'fglog' script

This commit is contained in:
samedamci 2020-05-17 11:18:58 +02:00
parent 7b8b96ac03
commit d04632bd05
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894
2 changed files with 7 additions and 5 deletions

View File

@ -6,5 +6,5 @@ unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx
icon="$(cat "/tmp/imapsyncicon_$USER" 2>/dev/null)"
[ "$unread" -gt "0" ] && echo " $unread " || echo ""
[ "$unread" -gt "0" ] && echo " $unread" || echo ""
echo "$icon"

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%