diff rc/bashrc @ 714:14e2910879f0

Combine sunos handler
author nanaya <me@nanaya.net>
date Thu, 19 Oct 2023 05:52:45 +0900
parents 4f5b040a589c
children 3f0fd2156612
line wrap: on
line diff
--- a/rc/bashrc	Thu Oct 19 05:52:05 2023 +0900
+++ b/rc/bashrc	Thu Oct 19 05:52:45 2023 +0900
@@ -98,25 +98,22 @@
 _has_posix_grep=y
 _uid=$(id -u)
 
-if [ SunOS = "${_os}" ]; then
-  if [ -f /usr/share/lib/terminfo/s/screen ]; then
-    export TERMINFO=/usr/share/lib/terminfo
-  elif [ -f /opt/csw/share/terminfo/s/screen ]; then
-    export TERMINFO=/opt/csw/share/terminfo
-  else
-    unset TERMINFO
-    export TERM=dtterm
-  fi
-
-  [ xterm = "${TERM}" ] && export TERM=xterm-256color
-fi
-
 case "${_os}" in
   Linux)
     _has_gnu_ls=y
     _has_gnu_grep=y
   ;;
   SunOS)
+    if [ -f /usr/share/lib/terminfo/s/screen ]; then
+      export TERMINFO=/usr/share/lib/terminfo
+    elif [ -f /opt/csw/share/terminfo/s/screen ]; then
+      export TERMINFO=/opt/csw/share/terminfo
+    else
+      unset TERMINFO
+      export TERM=dtterm
+    fi
+
+    [ xterm = "${TERM}" ] && export TERM=xterm-256color
     _has_posix_grep=n
     [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y
     [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y