1
0
Fork 0

bash now with more diff-so-fancy

This commit is contained in:
Von Random 2017-01-24 19:48:45 +03:00
parent 67c7c94ace
commit 0eb19bb939
2 changed files with 15 additions and 1 deletions

View file

@ -1,5 +1,20 @@
fuck() { echo 'no, fuck you'; }
gdiff() { /usr/bin/git diff --color "$@"; }
gdf()
{
local fancydiff='/usr/bin/diff-so-fancy'
local githighlight='/usr/share/git/diff-highlight/diff-highlight'
if [[ -x ${fancydiff} ]]; then
gdiff "$@" | ${fancydiff} | less --tabs=4 -RFX
elif [[ -x ${githighlight} ]]; then
gdiff "$@" | ${githighlight} | less --tabs=4 -RFX
else
gdiff "$@"
fi
}
enable_vscripts()
{
local vscripts="${HOME}/vscripts"

1
bashrc
View file

@ -131,7 +131,6 @@ alias mountnrg='sudo mount -o loop,offset=307200'
# git
alias gss='command git status -s'
alias gdf='command git diff'
alias gci='command git commit'
alias gup='command git pull'