diff --git a/.local/bin/scripts/fgdiff b/.local/bin/scripts/fgdiff new file mode 100755 index 0000000..f0f6e2c --- /dev/null +++ b/.local/bin/scripts/fgdiff @@ -0,0 +1,6 @@ +#!/bin/sh + +# Fuzzy Git uncommited files changes browser. + +git status | awk '/modified/ { print $2 }' | fzf --preview \ + 'git diff --color=always {}' diff --git a/.local/bin/scripts/fglog b/.local/bin/scripts/fglog new file mode 100755 index 0000000..f5e2138 --- /dev/null +++ b/.local/bin/scripts/fglog @@ -0,0 +1,7 @@ +#!/bin/sh + +# Fuzzy Git commits 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}'