comparison bash @ 122:eacc854eae67

Export should be used since it inherited to subshell (eg. tmux). Also hasten exit instead of fi on the bottom of file.
author Edho Prima Arief <edho@myconan.net>
date Wed, 26 Oct 2011 15:14:48 +0700
parents 548cf46e9cb4
children
comparison
equal deleted inserted replaced
117:548cf46e9cb4 122:eacc854eae67
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 2
3 if [ "${ECOS_BASH_LOADED}" != "yes" ]; then 3 if [ "${ECOS_BASH_LOADED}" != "yes" ]; then
4 4 ECOS_BASH_LOADED="yes"
5 export ECOS_BASH_LOADED="yes" 5 else
6 return
7 fi
6 8
7 [ -f "${HOME}/.ecos_bash.before" ] && . "${HOME}/.ecos_bash.before" 9 [ -f "${HOME}/.ecos_bash.before" ] && . "${HOME}/.ecos_bash.before"
8 10
9 _org_path="${PATH}" 11 _org_path="${PATH}"
10 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" 12 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
86 alias vi=vim 88 alias vi=vim
87 export EDITOR=vim 89 export EDITOR=vim
88 fi 90 fi
89 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" 91 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after"
90 92
91 fi
92