瀏覽代碼

shrc: Use git diff if available for di f

pull/15/head
10sr 9 年之前
父節點
當前提交
fb1cdc93a7
共有 1 個檔案被更改,包括 10 行新增4 行删除
  1. +10
    -4
      shrc

+ 10
- 4
shrc 查看文件

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

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

tb(){


Loading…
取消
儲存