Add 'fgdiff' and 'fglog' scripts
This commit is contained in:
parent
fbc555bdc7
commit
7b8b96ac03
6
.local/bin/scripts/fgdiff
Executable file
6
.local/bin/scripts/fgdiff
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Fuzzy Git uncommited files changes browser.
|
||||
|
||||
git status | awk '/modified/ { print $2 }' | fzf --preview \
|
||||
'git diff --color=always {}'
|
7
.local/bin/scripts/fglog
Executable file
7
.local/bin/scripts/fglog
Executable file
@ -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}'
|
Loading…
x
Reference in New Issue
Block a user