Mercurial > ec-dotfiles
annotate bash @ 49:b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
| author | Edho Prima Arief <me@myconan.net> |
|---|---|
| date | Wed, 27 Apr 2011 22:38:44 +0700 |
| parents | 416f9d3e9ee8 |
| children | b7a63c71b07f |
| 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 |
|
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
5 export 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 | |
|
49
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
24 [ -d /usr/gnu/bin ] && export PATH="/usr/gnu/bin:${PATH}" |
| 43 | 25 ;; |
| 26 *BSD) | |
| 27 _has_rm_I=y | |
| 28 ;; | |
| 29 esac | |
| 30 if [ $_has_rm_I = y ]; then | |
| 31 alias rm="rm -I" | |
| 32 else | |
| 33 alias rm="rm -i" | |
| 34 fi | |
| 35 | |
| 36 if [ $_has_gnu_ls = y ]; then | |
| 37 alias ls="ls -F --color=auto" | |
| 38 else | |
| 39 alias ls="ls -F" | |
| 40 fi | |
| 41 | |
|
49
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
42 unset _has_rm_I |
|
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
43 unset _has_gnu_ls |
|
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
44 unset _has_bsd_ls |
|
b924652e169d
[bash] Various tweaks: prompt, unset for check variables, etc
Edho Prima Arief <me@myconan.net>
parents:
48
diff
changeset
|
45 |
|
48
416f9d3e9ee8
[bash] Forgot the .bash.conf => .ecos_bash change.
Edho Prima Arief <me@myconan.net>
parents:
44
diff
changeset
|
46 [ -f .ecos_bash.after ] && . .ecos_bash.after |
