瀏覽代碼

add alias inbash and bashrc seems to work with zsh

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

+ 5
- 4
bashrc 查看文件

@@ -31,6 +31,10 @@ null ls --version && alias with_coreutils=true

( ismsys || iscygwin ) && alias iswindows=true

alias inbash=false

test -n "$BASH_VERSION" && alias inbash=true

#################################

if echo $PATH | grep "$HOME" >/dev/null 2>&1
@@ -80,8 +84,6 @@ mkdir -p "$TMP"
}

if iswindows; then
# export PS1=" \[\e[32m\]\u@\H \[\e[33m\]\w\[\e[0m\] \d \t\n\s \# \j \$ "
# export PS1=" [\[\e[33m\]\w\[\e[0m\]]\n\[\e[32m\]\u@\H\[\e[0m\] \d \t \s.\v\nhist:\# jobs:\j \$ "
export USER=$USERNAME
fi

@@ -253,7 +255,7 @@ g(){
git "$@"
fi
}
if null type _git
if null type _git && inbash
then
# enable programmable completion for g
complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \
@@ -807,4 +809,3 @@ __my_set_title(){
}
PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\:\${PWD};
__my_set_screen_title \$(basename \"\$PWD\")/"


Loading…
取消
儲存