comparison rc/bash @ 326:b27e43878127

[rc/bash] Better test for Solaris environment.
author Edho Arief <edho@myconan.net>
date Sun, 18 Mar 2012 16:24:28 +0700
parents e59a766d5fa3
children aeb51856e281
comparison
equal deleted inserted replaced
325:795ad57794a6 326:b27e43878127
59 alias ping="ping -s" 59 alias ping="ping -s"
60 alias ping6="ping -A inet6" 60 alias ping6="ping -A inet6"
61 # Hello tmux. Perhaps one day we'll have title with dtterm. 61 # Hello tmux. Perhaps one day we'll have title with dtterm.
62 # But for now we work this around by prepending tmux call with xterm-256color 62 # But for now we work this around by prepending tmux call with xterm-256color
63 # which hopefully exists. Otherwise we have to live with no title. 63 # which hopefully exists. Otherwise we have to live with no title.
64 if [ -f /usr/share/lib/terminfo/x/xterm-256color ]; then 64 [ -f "/usr/share/lib/terminfo/x/xterm-256color" ] && has_xterm256c=y
65 alias tmux="TERM=xterm-256color tmux" 65 [ -f "/usr/share/lib/terminfo/s/screen" ] && has_screen=y
66 else 66 case "${TERM}" in
67 echo "No xterm-256color terminal, using dtterm. Tmux title won't work." 67 xterm*)
68 fi 68 if [ -f "/usr/share/lib/terminfo/x/xterm-256color" ]; then
69 [ -f /usr/share/lib/terminfo/?/"${TERM}" ] || export TERM=dtterm 69 export TERM="xterm-256color"
70 else
71 echo "No xterm-256color terminal, using dtterm. Tmux title won't work."
72 export TERM="dtterm"
73 fi
74 ;;
75 screen)
76 [ -f "/usr/share/lib/terminfo/s/screen" ] || export TERM="dtterm"
77 ;;
78 esac
70 if command -v ggrep > /dev/null 2>&1; then 79 if command -v ggrep > /dev/null 2>&1; then
71 _has_gnu_grep=y 80 _has_gnu_grep=y
72 _grep="ggrep" 81 _grep="ggrep"
73 fi 82 fi
74 if command -v gls > /dev/null 2>&1; then 83 if command -v gls > /dev/null 2>&1; then