diff rc/bashrc @ 628:7bcc81f6b210

Correct os version check
author nanaya <me@nanaya.pro>
date Sun, 30 Jun 2019 20:31:45 +0900
parents 84791ac85abd
children d36b8abe71ec
line wrap: on
line diff
--- a/rc/bashrc	Sun Jun 30 20:25:30 2019 +0900
+++ b/rc/bashrc	Sun Jun 30 20:31:45 2019 +0900
@@ -30,6 +30,7 @@
 export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/games"
 
 _os="$(uname -s)"
+_os_r="$(uname -r)"
 
 # pkgsrc
 if test -d /usr/pkg; then
@@ -287,12 +288,16 @@
 
 if command -v tmux > /dev/null 2>&1; then
   case "${_os}" in
-  "OpenBSD "*" "6.[5-9]" "*|"OpenBSD "*" "[7-9].[0-9]" "*|"OpenBSD "*" "[1-9][0-9][0-9]*.[0-9]" "*)
-    _tmux_conf_ver=2.9
-  ;;
   OpenBSD)
-    # probably not accurate enough but I don't want to dig through all the previous versions.
-    _tmux_conf_ver=2.2
+    case "${_os_r}" in
+    6.[5-9]|[7-9].[0-9]|[1-9][0-9][0-9]*.[0-9])
+      _tmux_conf_ver=2.9
+    ;;
+    *)
+      # probably not accurate enough but I don't want to dig through all the previous versions.
+      _tmux_conf_ver=2.2
+    ;;
+    esac
   ;;
   *)
     case "$(tmux -V 2> /dev/null)" in
@@ -309,5 +314,6 @@
 fi
 
 unset _os
+unset _os_r
 
 [ -f "${HOME}/.ec.bash.after" ] && . "${HOME}/.ec.bash.after"