Mercurial > ec-dotfiles
comparison rc/bash @ 268:feab84a8efdb
Merge. Also more workaround for Solaris tmux.
| author | Edho Arief <edho@myconan.net> |
|---|---|
| date | Thu, 24 Nov 2011 13:52:07 +0700 |
| parents | 20ff9a9d11f0 e35a36bb832e |
| children | cd48b7a5cddd |
comparison
equal
deleted
inserted
replaced
| 265:20ff9a9d11f0 | 268:feab84a8efdb |
|---|---|
| 22 export HISTCONTROL=ignoredups | 22 export HISTCONTROL=ignoredups |
| 23 | 23 |
| 24 export PAGER="less -Rins" | 24 export PAGER="less -Rins" |
| 25 export EDITOR=vi | 25 export EDITOR=vi |
| 26 export LANG="en_US.UTF-8" | 26 export LANG="en_US.UTF-8" |
| 27 unset LS_COLORS | 27 export CLICOLOR= |
| 28 export LSCOLORS=ExGxFxdxCxegedabagExEx | |
| 28 | 29 |
| 29 alias less="less -Rins" | 30 alias less="less -Rins" |
| 30 #assuming POSIX grep | 31 #assuming POSIX grep |
| 31 alias fgrep="grep -F" | 32 alias fgrep="grep -F" |
| 32 alias egrep="grep -E" | 33 alias egrep="grep -E" |
| 33 alias ls="ls -F" | 34 alias ls="ls -F" |
| 34 alias rm="rm -i" | 35 alias rm="rm -i" |
| 35 alias rd="rdesktop -g 1280x600 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" | 36 alias rd="rdesktop -g 1280x600 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" |
| 36 | 37 |
| 37 _has_rm_I= | |
| 38 _has_gnu_ls= | 38 _has_gnu_ls= |
| 39 _has_gnu_grep= | 39 _has_gnu_grep= |
| 40 _ls="ls" | 40 _ls="ls" |
| 41 case "$(uname -s)" in | 41 case "$(uname -s)" in |
| 42 Linux) | 42 Linux) |
| 43 _has_rm_I=y | |
| 44 _has_gnu_ls=y | 43 _has_gnu_ls=y |
| 45 _has_gnu_grep=y | 44 _has_gnu_grep=y |
| 46 ;; | 45 ;; |
| 47 SunOS) | 46 SunOS) |
| 48 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y | |
| 49 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y | 47 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y |
| 50 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y | 48 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y |
| 51 # Higher priority directories | 49 # Higher priority directories |
| 52 for i in {/opt/csw,/usr/gnu}/{,s}bin; do | 50 for i in {/opt/csw,/usr/gnu}/{,s}bin; do |
| 53 [ -d "${i}" ] && PATH="${i}:${PATH}" | 51 [ -d "${i}" ] && PATH="${i}:${PATH}" |
| 56 [ -d "${i}" ] && PATH="${PATH}:${i}" | 54 [ -d "${i}" ] && PATH="${PATH}:${i}" |
| 57 done | 55 done |
| 58 alias ping="ping -s" | 56 alias ping="ping -s" |
| 59 alias ping6="ping -A inet6" | 57 alias ping6="ping -A inet6" |
| 60 # Hello tmux. Perhaps one day we'll have title with dtterm. | 58 # Hello tmux. Perhaps one day we'll have title with dtterm. |
| 61 # But for now we work this around by prepending tmux call with xtermc. | 59 # But for now we work this around by prepending tmux call with xterm-256color |
| 62 alias tmux="TERM=xtermc tmux" | 60 # which hopefully exists. Otherwise we have to live with no title. |
| 63 [ -f "/usr/share/lib/terminfo/?/${TERM}" ] || export TERM=dtterm | 61 if [ -f /usr/share/lib/terminfo/x/xterm-256color ]; then |
| 64 ;; | 62 alias tmux="TERM=xterm-256color tmux" |
| 65 FreeBSD) | 63 else |
| 66 _has_rm_I=y | 64 echo "No xterm-256color, using dtterm. Tmux title won't work." |
| 67 export CLICOLOR= | 65 fi |
| 68 export LSCOLORS=ExGxFxdxCxegedabagExEx | 66 [ -f /usr/share/lib/terminfo/?/"${TERM}" ] || export TERM=dtterm |
| 69 ;; | 67 ;; |
| 70 OpenBSD) | 68 OpenBSD) |
| 71 PATH="${PATH}:/usr/X11R6/bin" | 69 PATH="${PATH}:/usr/X11R6/bin" |
| 72 if command -v gls > /dev/null 2>&1; then | 70 if command -v gls > /dev/null 2>&1; then |
| 73 _has_gnu_ls=y | 71 _has_gnu_ls=y |
| 74 _ls="gls" | 72 _ls="gls" |
| 75 elif command -v colorls > /dev/null 2>&1; then | 73 elif command -v colorls > /dev/null 2>&1; then |
| 76 export CLICOLOR= | |
| 77 export LSCOLORS=ExGxFxdxCxegedabagExEx | |
| 78 alias ls='colorls -F' | 74 alias ls='colorls -F' |
| 79 fi | 75 fi |
| 80 ;; | 76 ;; |
| 81 NetBSD) | 77 NetBSD) |
| 82 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" | 78 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" |
| 83 if command -v gls > /dev/null 2>&1; then | 79 if command -v gls > /dev/null 2>&1; then |
| 84 _has_gnu_ls=y | 80 _has_gnu_ls=y |
| 85 _ls="gls" | 81 _ls="gls" |
| 86 elif command -v colorls > /dev/null 2>&1; then | 82 elif command -v colorls > /dev/null 2>&1; then |
| 87 export CLICOLOR= | |
| 88 export LSCOLORS=ExGxFxdxCxegedabagExEx | |
| 89 alias ls='colorls -F' | 83 alias ls='colorls -F' |
| 90 fi | 84 fi |
| 91 ;; | 85 ;; |
| 92 CYGWIN*) | 86 CYGWIN*) |
| 93 export PATH="${PATH}:${_org_path}" | 87 export PATH="${PATH}:${_org_path}" |
| 94 ;; | 88 ;; |
| 95 esac | 89 esac |
| 96 | 90 |
| 97 [ "${_has_rm_I}" = y ] && alias rm="rm -I" | |
| 98 [ "${_has_gnu_ls}" = y ] && alias ls="${_ls} -F --color=auto" | 91 [ "${_has_gnu_ls}" = y ] && alias ls="${_ls} -F --color=auto" |
| 99 [ "${_has_gnu_grep}" = y ] && alias grep="grep --color=auto" | 92 [ "${_has_gnu_grep}" = y ] && alias grep="grep --color=auto" |
| 100 | 93 |
| 101 unset _has_rm_I | |
| 102 unset _has_gnu_ls | 94 unset _has_gnu_ls |
| 103 unset _has_gnu_grep | 95 unset _has_gnu_grep |
| 104 unset _ls | 96 unset _ls |
| 105 | 97 |
| 106 # Custom application I usually install and safe to prioritize | 98 # Custom application I usually install and safe to prioritize |
| 139 | 131 |
| 140 if command -v vim > /dev/null 2>&1; then | 132 if command -v vim > /dev/null 2>&1; then |
| 141 alias vi=vim | 133 alias vi=vim |
| 142 export EDITOR=vim | 134 export EDITOR=vim |
| 143 fi | 135 fi |
| 136 | |
| 137 rm -If "/tmp/.nonexistent.$(date '+%Y%m%d%H%M%S')" 2> /dev/null && alias rm="rm -I" | |
| 138 | |
| 144 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" | 139 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" |
| 145 | 140 |
