Mercurial > ec-dotfiles
comparison rc/bashrc @ 400:657f787fbae8
Merge remote-tracking branch 'origin/master'
| author | Edho Arief <edho@myconan.net> |
|---|---|
| date | Tue, 04 Sep 2012 10:23:37 +0700 |
| parents | c01d272af466 c555557692bc |
| children | a23b0f6ee8a2 |
comparison
equal
deleted
inserted
replaced
| 395:c01d272af466 | 400:657f787fbae8 |
|---|---|
| 12 fi | 12 fi |
| 13 | 13 |
| 14 [ -f "${HOME}/.ecos_bash.before" ] && . "${HOME}/.ecos_bash.before" | 14 [ -f "${HOME}/.ecos_bash.before" ] && . "${HOME}/.ecos_bash.before" |
| 15 | 15 |
| 16 _org_path="${PATH}" | 16 _org_path="${PATH}" |
| 17 | |
| 18 # Basic PATH | |
| 17 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" | 19 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" |
| 20 | |
| 21 # pkgsrc | |
| 22 if test -d /usr/pkg; then | |
| 23 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" | |
| 24 if test -d /usr/pkg/java/openjdk7; then | |
| 25 # OpenJDK 7 in pkgsrc | |
| 26 PATH="${PATH}:/usr/pkg/java/openjdk7/bin" | |
| 27 fi | |
| 28 fi | |
| 29 # OpenBSD X11 | |
| 30 test -d /usr/X11R6/bin && PATH="${PATH}:/usr/X11R6/bin" | |
| 31 # PostgreSQL Yum | |
| 32 test -d /usr/pgsql-8.4 && PATH="/usr/pgsql-8.4/bin:${PATH}" | |
| 33 test -d /usr/pgsql-9.1 && PATH="/usr/pgsql-9.1/bin:${PATH}" | |
| 34 | |
| 35 # Nuke currently defined functions | |
| 36 unset -f $(set | grep ' \(\)$' | cut -d ' ' -f 1) | |
| 37 | |
| 38 # Nuke bash-completion | |
| 39 complete -r | |
| 40 | |
| 41 # Nuke aliases | |
| 42 unalias -a | |
| 18 | 43 |
| 19 shopt -s histappend | 44 shopt -s histappend |
| 20 PROMPT_COMMAND="history -a; history -n" | 45 PROMPT_COMMAND="history -a; history -n" |
| 21 export HISTFILESIZE=10000 | 46 export HISTFILESIZE=10000 |
| 22 export HISTCONTROL=ignoredups | 47 export HISTCONTROL=ignoredups |
| 32 export LS_COLORS= | 57 export LS_COLORS= |
| 33 export BLOCKSIZE=1K | 58 export BLOCKSIZE=1K |
| 34 export BLOCK_SIZE=si | 59 export BLOCK_SIZE=si |
| 35 | 60 |
| 36 alias ls="ls -F" | 61 alias ls="ls -F" |
| 37 alias rm="rm -i" | |
| 38 alias rd="rdesktop -g 1280x600 -K -a 15 -x m -z -P -r sound:off -r clipboard:CLIPBOARD -5" | 62 alias rd="rdesktop -g 1280x600 -K -a 15 -x m -z -P -r sound:off -r clipboard:CLIPBOARD -5" |
| 39 alias man="LANG=C man" | 63 alias man="LANG=C man" |
| 40 | 64 |
| 41 _has_gnu_ls= | 65 _has_gnu_ls= |
| 42 _has_gnu_grep= | 66 _has_gnu_grep= |
| 93 alias man="man -o" | 117 alias man="man -o" |
| 94 # Multi CPU awesomeness. | 118 # Multi CPU awesomeness. |
| 95 alias top="top -P" | 119 alias top="top -P" |
| 96 ;; | 120 ;; |
| 97 OpenBSD) | 121 OpenBSD) |
| 98 PATH="${PATH}:/usr/X11R6/bin" | |
| 99 if command -v gls > /dev/null 2>&1; then | 122 if command -v gls > /dev/null 2>&1; then |
| 100 _has_gnu_ls=y | 123 _has_gnu_ls=y |
| 101 _ls="gls" | 124 _ls="gls" |
| 102 elif command -v colorls > /dev/null 2>&1; then | 125 elif command -v colorls > /dev/null 2>&1; then |
| 103 alias ls="colorls -F" | 126 alias ls="colorls -F" |
| 104 fi | 127 fi |
| 105 ;; | 128 ;; |
| 106 NetBSD|DragonFly) | 129 NetBSD|DragonFly) |
| 107 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" | |
| 108 if command -v gls > /dev/null 2>&1; then | 130 if command -v gls > /dev/null 2>&1; then |
| 109 _has_gnu_ls=y | 131 _has_gnu_ls=y |
| 110 _ls="gls" | 132 _ls="gls" |
| 111 elif command -v colorls > /dev/null 2>&1; then | 133 elif command -v colorls > /dev/null 2>&1; then |
| 112 alias ls="colorls -F" | 134 alias ls="colorls -F" |
| 113 fi | 135 fi |
| 136 alias grep='grep --color=auto' | |
| 114 ;; | 137 ;; |
| 115 CYGWIN*) | 138 CYGWIN*) |
| 116 export PATH="${PATH}:${_org_path}" | 139 export PATH="${PATH}:${_org_path}" |
| 117 ;; | 140 ;; |
| 118 esac | 141 esac |
| 193 if command -v less > /dev/null 2>&1; then | 216 if command -v less > /dev/null 2>&1; then |
| 194 export PAGER=less | 217 export PAGER=less |
| 195 export LESS='-MRXgij15$nsz-2' | 218 export LESS='-MRXgij15$nsz-2' |
| 196 fi | 219 fi |
| 197 | 220 |
| 198 rm -If "/tmp/.nonexistent.$(date '+%Y%m%d%H%M%S')" 2> /dev/null && alias rm="rm -I" | 221 # Test if we have GNU rm prefixed by g (esp if on non-GNU system). |
| 222 # Usually on old Solaris and {Net,Open,DragonFly}BSD. | |
| 223 if command -v grm > /dev/null 2>&1; then | |
| 224 _rm="grm" | |
| 225 else | |
| 226 _rm="rm" | |
| 227 fi | |
| 228 # Test if the specified rm has "-I" parameter since it's much better. | |
| 229 if "${_rm}" -If "/tmp/.nonexistent.$(date '+%Y%m%d%H%M%S')" 2> /dev/null; then | |
| 230 alias rm="${_rm} -I" | |
| 231 else | |
| 232 alias rm="${_rm} -i" | |
| 233 fi | |
| 234 unset _rm | |
| 199 | 235 |
| 200 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" | 236 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" |
