bash now with more diff-so-fancy
This commit is contained in:
parent
67c7c94ace
commit
0eb19bb939
2 changed files with 15 additions and 1 deletions
15
bashplugins
15
bashplugins
|
@ -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
1
bashrc
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in a new issue