comparison rc/bashrc @ 422:9d016276d889

Added compatibility with joyent's smartos.
author Edho Arief <edho@myconan.net>
date Wed, 19 Dec 2012 05:35:43 +0000
parents 587abe573053
children a0f95c4f360c
comparison
equal deleted inserted replaced
421:6e682757a5f7 422:9d016276d889
85 done 85 done
86 for i in /usr/{sfw,xpg4}/bin; do 86 for i in /usr/{sfw,xpg4}/bin; do
87 [ -d "${i}" ] && PATH="${PATH}:${i}" 87 [ -d "${i}" ] && PATH="${PATH}:${i}"
88 done 88 done
89 [ -d "/opt/csw/gnu" ] && PATH="/opt/csw/gnu:${PATH}" 89 [ -d "/opt/csw/gnu" ] && PATH="/opt/csw/gnu:${PATH}"
90 # Joyent's pkgsrc is awesome.
91 [ -d /opt/local ] && PATH="/opt/local/bin:/opt/local/sbin:${PATH}"
92 # Working terminfo (as opposed to solaris' mostly-broken terminfo).
93 [ -d /opt/local/share/lib/terminfo ] && export TERMINFO=/opt/local/share/lib/terminfo
90 alias ping="ping -s" 94 alias ping="ping -s"
91 alias ping6="ping -A inet6" 95 alias ping6="ping -A inet6"
92 # Hello tmux. Perhaps one day we'll have title with dtterm. 96 # Check if we have sane(?) terminfo, assume broken terminfo otherwise.
93 # But for now we work this around by prepending tmux call with xterm-256color 97 if [ -z "${TERMINFO}" ]; then
94 # which hopefully exists. Otherwise we have to live with no title. 98 # Hello tmux. Perhaps one day we'll have title with dtterm.
95 case "${TERM}" in 99 # But for now we work this around by prepending tmux call with xterm-256color
96 xterm*) 100 # which hopefully exists. Otherwise we have to live with no title.
97 if [ -f "/usr/share/lib/terminfo/x/xterm-256color" ]; then 101 case "${TERM}" in
98 export TERM="xterm-256color" 102 xterm*)
99 else 103 if [ -f "/usr/share/lib/terminfo/x/xterm-256color" ]; then
100 echo "No xterm-256color terminal, using dtterm. Tmux title won't work." 104 export TERM="xterm-256color"
101 export TERM="dtterm" 105 else
102 fi 106 echo "No xterm-256color terminal, using dtterm. Tmux title won't work."
103 ;; 107 export TERM="dtterm"
104 screen) 108 fi
105 [ -f "/usr/share/lib/terminfo/s/screen" ] || export TERM="dtterm" 109 ;;
106 ;; 110 screen)
107 esac 111 [ -f "/usr/share/lib/terminfo/s/screen" ] || export TERM="dtterm"
112 ;;
113 esac
114 fi
108 if command -v ggrep > /dev/null 2>&1; then 115 if command -v ggrep > /dev/null 2>&1; then
109 _has_gnu_grep=y 116 _has_gnu_grep=y
110 _grep="ggrep" 117 _grep="ggrep"
111 fi 118 fi
112 if command -v gls > /dev/null 2>&1; then 119 if command -v gls > /dev/null 2>&1; then