Mercurial > ec-dotfiles
annotate bash @ 48:416f9d3e9ee8
[bash] Forgot the .bash.conf => .ecos_bash change.
| author | Edho Prima Arief <me@myconan.net> | 
|---|---|
| date | Wed, 27 Apr 2011 21:35:20 +0700 | 
| parents | 1f1af28f36e9 | 
| children | b924652e169d | 
| rev | line source | 
|---|---|
| 43 | 1 #!/usr/bin/env bash | 
| 2 | |
| 44 
1f1af28f36e9
[bash] Bashrc, c-style ifdef.
 Edho Prima Arief <me@myconan.net> parents: 
43diff
changeset | 3 [ -n "${echo_bash}" ] && return | 
| 
1f1af28f36e9
[bash] Bashrc, c-style ifdef.
 Edho Prima Arief <me@myconan.net> parents: 
43diff
changeset | 4 ecos_bash=y | 
| 
1f1af28f36e9
[bash] Bashrc, c-style ifdef.
 Edho Prima Arief <me@myconan.net> parents: 
43diff
changeset | 5 | 
| 48 
416f9d3e9ee8
[bash] Forgot the .bash.conf => .ecos_bash change.
 Edho Prima Arief <me@myconan.net> parents: 
44diff
changeset | 6 [ -f .ecos_bash.before ] && . .ecos_bash.before | 
| 43 | 7 _has_rm_I= | 
| 8 _has_gnu_ls= | |
| 9 _has_bsd_ls= | |
| 10 case "$(uname -s)" in | |
| 11 Linux) | |
| 12 _has_rm_I=y | |
| 13 _has_gnu_ls=y | |
| 14 ;; | |
| 15 SunOS) | |
| 16 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y | |
| 17 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y | |
| 18 ;; | |
| 19 *BSD) | |
| 20 _has_rm_I=y | |
| 21 ;; | |
| 22 esac | |
| 23 | |
| 24 if [ $_has_rm_I = y ]; then | |
| 25 alias rm="rm -I" | |
| 26 else | |
| 27 alias rm="rm -i" | |
| 28 fi | |
| 29 | |
| 30 if [ $_has_gnu_ls = y ]; then | |
| 31 alias ls="ls -F --color=auto" | |
| 32 else | |
| 33 alias ls="ls -F" | |
| 34 fi | |
| 35 | |
| 48 
416f9d3e9ee8
[bash] Forgot the .bash.conf => .ecos_bash change.
 Edho Prima Arief <me@myconan.net> parents: 
44diff
changeset | 36 [ -f .ecos_bash.after ] && . .ecos_bash.after | 
