Browse Source

shrc: Use git diff if available for di f

pull/15/head
10sr 9 years ago
parent
commit
fb1cdc93a7
1 changed files with 10 additions and 4 deletions
  1. +10
    -4
      shrc

+ 10
- 4
shrc View File

@@ -820,13 +820,19 @@ bak(){
} }


di(){ di(){
if type colordiff >/dev/null 2>&1 && test $TERM != dumb
if null type git
then then
___diffcmd=colordiff
git --git-dir= diff "$@"
___diffcmd="git --git-dir= diff"
else else
___diffcmd=diff
if type colordiff >/dev/null 2>&1 && test $TERM != dumb
then
___diffcmd=colordiff
else
___diffcmd=diff
fi
${___diffcmd} -u "$@" | ${PAGER}
fi fi
${___diffcmd} -u "$@" | ${PAGER}
} }


tb(){ tb(){


Loading…
Cancel
Save