Mercurial > ec-dotfiles
comparison rc/bash @ 258:0cd601956a9a
Merge.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Sun, 20 Nov 2011 23:21:45 +0700 |
parents | adcea08f6807 |
children | 6bdfe1746bb1 |
comparison
equal
deleted
inserted
replaced
251:d7e5a2e70cf3 | 258:0cd601956a9a |
---|---|
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 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" | 17 export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" |
18 | 18 |
19 case "${TERM}" in | 19 # Custom application I usually install and safe to prioritize |
20 xterm*|dtterm*|screen*) | 20 for i in {"${HOME}/app","/opt"}/{tmux,ruby19,node,tarsnap,symon,nginx}/{bin,sbin}; do |
21 PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ ' | 21 [ -d "${i}" ] && PATH="${i}:${PATH}" |
22 ;; | 22 done |
23 *) | |
24 PS1='[\u@\h \W]\$ ' | |
25 ;; | |
26 esac | |
27 | 23 |
28 shopt -s histappend | 24 shopt -s histappend |
29 PROMPT_COMMAND='history -a' | 25 PROMPT_COMMAND='history -a' |
30 export HISTFILESIZE=10000 | 26 export HISTFILESIZE=10000 |
31 export HISTCONTROL=ignoredups | 27 export HISTCONTROL=ignoredups |
55 ;; | 51 ;; |
56 SunOS) | 52 SunOS) |
57 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y | 53 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y |
58 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y | 54 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y |
59 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y | 55 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y |
60 [ -d /opt/csw/bin ] && PATH="/opt/csw/bin:${PATH}" | 56 # Higher priority directories |
61 [ -d /opt/csw/sbin ] && PATH="/opt/csw/sbin:${PATH}" | 57 for i in {/opt/csw,/usr/gnu}/{,s}bin; do |
62 [ -d /usr/gnu/bin ] && PATH="/usr/gnu/bin:${PATH}" | 58 [ -d "${i}" ] && PATH="${i}:${PATH}" |
63 [ -d /usr/sfw/bin ] && PATH="${PATH}:/usr/sfw/bin" | 59 done |
64 [ -d /usr/xpg4/bin ] && PATH="${PATH}:/usr/xpg4/bin" | 60 for i in /usr/{sfw,xpg4}/bin; do |
65 export PATH | 61 [ -d "${i}" ] && PATH="${PATH}:${i}" |
62 done | |
66 alias ping="ping -s" | 63 alias ping="ping -s" |
67 alias ping6="ping -A inet6" | 64 alias ping6="ping -A inet6" |
68 ;; | 65 ;; |
69 FreeBSD) | 66 FreeBSD) |
70 _has_rm_I=y | 67 _has_rm_I=y |
71 export CLICOLOR= | 68 export CLICOLOR= |
72 export LSCOLORS=ExGxFxdxCxegedabagExEx | 69 export LSCOLORS=ExGxFxdxCxegedabagExEx |
73 ;; | 70 ;; |
74 OpenBSD) | 71 OpenBSD) |
72 PATH="${PATH}:/usr/X11R6/bin" | |
75 if command -v gls > /dev/null 2>&1; then | 73 if command -v gls > /dev/null 2>&1; then |
76 _has_gnu_ls=y | 74 _has_gnu_ls=y |
77 _ls="gls" | 75 _ls="gls" |
78 elif command -v colorls > /dev/null 2>&1; then | 76 elif command -v colorls > /dev/null 2>&1; then |
79 export CLICOLOR= | 77 export CLICOLOR= |
80 export LSCOLORS=ExGxFxdxCxegedabagExEx | 78 export LSCOLORS=ExGxFxdxCxegedabagExEx |
81 alias ls='colorls -F' | 79 alias ls='colorls -F' |
82 fi | 80 fi |
83 ;; | 81 ;; |
84 NetBSD) | 82 NetBSD) |
85 export PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" | 83 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" |
86 if command -v gls > /dev/null 2>&1; then | 84 if command -v gls > /dev/null 2>&1; then |
87 _has_gnu_ls=y | 85 _has_gnu_ls=y |
88 _ls="gls" | 86 _ls="gls" |
89 elif command -v colorls > /dev/null 2>&1; then | 87 elif command -v colorls > /dev/null 2>&1; then |
90 export CLICOLOR= | 88 export CLICOLOR= |
106 unset _has_gnu_grep | 104 unset _has_gnu_grep |
107 unset _ls | 105 unset _ls |
108 | 106 |
109 | 107 |
110 case "${TERM}" in | 108 case "${TERM}" in |
111 xterm*|screen*|dtterm) | 109 xterm*|screen*|dtterm*) |
112 PROMPT_COMMAND='echo -ne "\033]0;${LOGNAME}@${HOSTNAME}: ${PWD}\007";'"${PROMPT_COMMAND}" | 110 PROMPT_COMMAND='echo -ne "\033]0;'"$(id -un)@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" |
111 PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ ' | |
112 ;; | |
113 *) | |
114 PS1='[\u@\h \W]\$ ' | |
113 ;; | 115 ;; |
114 esac | 116 esac |
115 | 117 |
116 if command -v vim > /dev/null 2>&1; then | 118 if command -v vim > /dev/null 2>&1; then |
117 alias vi=vim | 119 alias vi=vim |