Mercurial > ec-dotfiles
annotate bash @ 50:b7a63c71b07f
[bash] export PATH last, added various default solaris PATH.
author | Edho Prima Arief <me@myconan.net> |
---|---|
date | Wed, 27 Apr 2011 22:42:33 +0700 |
parents | b924652e169d |
children | 4496c7bf953d |
rev | line source |
---|---|
43 | 1 #!/usr/bin/env bash |
2 | |
49
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
3 [ -f .ecos_bash.before ] && . .ecos_bash.before |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
4 |
50
b7a63c71b07f
[bash] export PATH last, added various default solaris PATH.
Edho Prima Arief <me@myconan.net>
parents:
49
diff
changeset
|
5 PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" |
44
1f1af28f36e9
[bash] Bashrc, c-style ifdef.
Edho Prima Arief <me@myconan.net>
parents:
43
diff
changeset
|
6 |
49
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
7 PS1='[\u@\h \W]\$ ' |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
8 |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
9 export PAGER='less -Rins' |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
10 export EDITOR=vi |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
11 |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
12 alias less='less -Rins' |
43 | 13 _has_rm_I= |
14 _has_gnu_ls= | |
15 _has_bsd_ls= | |
16 case "$(uname -s)" in | |
17 Linux) | |
18 _has_rm_I=y | |
19 _has_gnu_ls=y | |
20 ;; | |
21 SunOS) | |
22 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y | |
23 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y | |
50
b7a63c71b07f
[bash] export PATH last, added various default solaris PATH.
Edho Prima Arief <me@myconan.net>
parents:
49
diff
changeset
|
24 [ -d /usr/gnu/bin ] && PATH="/usr/gnu/bin:${PATH}" |
b7a63c71b07f
[bash] export PATH last, added various default solaris PATH.
Edho Prima Arief <me@myconan.net>
parents:
49
diff
changeset
|
25 [ -d /opt/csw/bin ] && PATH="/opt/csw/bin:${PATH}" |
b7a63c71b07f
[bash] export PATH last, added various default solaris PATH.
Edho Prima Arief <me@myconan.net>
parents:
49
diff
changeset
|
26 [ -d /opt/csw/sbin ] && PATH="/opt/csw/sbin:${PATH}" |
43 | 27 ;; |
28 *BSD) | |
29 _has_rm_I=y | |
30 ;; | |
31 esac | |
32 if [ $_has_rm_I = y ]; then | |
33 alias rm="rm -I" | |
34 else | |
35 alias rm="rm -i" | |
36 fi | |
37 | |
38 if [ $_has_gnu_ls = y ]; then | |
39 alias ls="ls -F --color=auto" | |
40 else | |
41 alias ls="ls -F" | |
42 fi | |
43 | |
49
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
44 unset _has_rm_I |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
45 unset _has_gnu_ls |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
46 unset _has_bsd_ls |
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
47 |
50
b7a63c71b07f
[bash] export PATH last, added various default solaris PATH.
Edho Prima Arief <me@myconan.net>
parents:
49
diff
changeset
|
48 export PATH |
48
416f9d3e9ee8
[bash] Forgot the .bash.conf => .ecos_bash change.
Edho Prima Arief <me@myconan.net>
parents:
44
diff
changeset
|
49 [ -f .ecos_bash.after ] && . .ecos_bash.after |