瀏覽代碼

fix(alias): avoiding edge cases on some systems

Kyle P Davis 3 年之前
父節點
當前提交
414ca54f95
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      .profile

+ 5 - 4
.profile

@@ -85,17 +85,18 @@ alias la="ls -Fa"
 alias ll="ls -Fla"
 alias ll="ls -Fla"
 alias l="ls -FC"
 alias l="ls -FC"
 alias d="l"
 alias d="l"
-alias tree="tree -CF"
+alias tree="tree -C -F"
 alias grep="grep --color --exclude-dir={.svn,.git,node_modules}"
 alias grep="grep --color --exclude-dir={.svn,.git,node_modules}"
-alias man='LESS_TERMCAP_md=$(tput bold; tput setaf 4) LESS_TERMCAP_me=$(tput sgr0) LESS_TERMCAP_mb=$(tput blink) LESS_TERMCAP_us=$(tput setaf 2) LESS_TERMCAP_ue=$(tput sgr0) LESS_TERMCAP_so=$(tput smso) LESS_TERMCAP_se=$(tput rmso) PAGER="${commands[less]:-$PAGER}" man'
+alias man='LESS_TERMCAP_md=$(tput bold && tput setaf 4 || :) LESS_TERMCAP_me=$(tput sgr0 || :) LESS_TERMCAP_mb=$(tput blink || :) LESS_TERMCAP_us=$(tput setaf 2 || :) LESS_TERMCAP_ue=$(tput sgr0 || :) LESS_TERMCAP_so=$(tput smso || :) LESS_TERMCAP_se=$(tput rmso || :) PAGER="${commands[less]:-$PAGER}" man'
 alias node-print="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.log,console.error)'"
 alias node-print="node -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))}; eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.log,console.error)'"
 alias ts-node-print="TS_NODE_FILES=true node -r ts-node/register -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))} eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.log,console.error)'"
 alias ts-node-print="TS_NODE_FILES=true node -r ts-node/register -e 'let [,f=\".\",e=\"this\"]=process.argv,ctx; try{ctx=require(f)}catch{ctx=require(path.resolve(f))} eval(\`(async function(){ with(this) return (\${e}); })\`).call(ctx).then(console.log,console.error)'"
+alias vi=vim
 
 
 # color diffs
 # color diffs
-! command -v colordiff &>/dev/null  ||  alias diff="colordiff"
+! command -v colordiff >/dev/null  ||  alias diff="colordiff"
 
 
 # color json
 # color json
-! command -v json &>/dev/null  ||  alias json="json -o inspect"
+! command -v json >/dev/null  ||  alias json="json -o inspect"
 
 
 # MacVim shell aliases
 # MacVim shell aliases
 if [ "$OS" = "Darwin" ]; then
 if [ "$OS" = "Darwin" ]; then