comparison rc/bashrc @ 713:4f5b040a589c

Remove support for old openbsd tmux
author nanaya <me@nanaya.net>
date Thu, 19 Oct 2023 05:52:05 +0900
parents c1ad9cc00624
children 14e2910879f0
comparison
equal deleted inserted replaced
712:c1ad9cc00624 713:4f5b040a589c
28 28
29 # Basic PATH 29 # Basic PATH
30 export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/games" 30 export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/games"
31 31
32 _os="$(uname -s)" 32 _os="$(uname -s)"
33 _os_r="$(uname -r)"
34 33
35 # pkgsrc 34 # pkgsrc
36 if test -d /usr/pkg; then 35 if test -d /usr/pkg; then
37 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin" 36 PATH="${PATH}:/usr/pkg/bin:/usr/pkg/sbin"
38 if test -d /usr/pkg/java/openjdk7; then 37 if test -d /usr/pkg/java/openjdk7; then
284 fi 283 fi
285 284
286 if command -v tmux > /dev/null 2>&1; then 285 if command -v tmux > /dev/null 2>&1; then
287 case "${_os}" in 286 case "${_os}" in
288 OpenBSD) 287 OpenBSD)
289 case "${_os_r}" in
290 6.[5-9]|[7-9].[0-9]|[1-9][0-9][0-9]*.[0-9])
291 _tmux_conf_ver=2.9 288 _tmux_conf_ver=2.9
292 ;;
293 *)
294 # probably not accurate enough but I don't want to dig through all the previous versions.
295 _tmux_conf_ver=2.2
296 ;;
297 esac
298 ;; 289 ;;
299 *) 290 *)
300 case "$(tmux -V 2> /dev/null)" in 291 case "$(tmux -V 2> /dev/null)" in
301 "tmux 2.9"|"tmux 2.9"[a-z]|"tmux "[3-9].[0-9]|"tmux "[3-9].[0-9][a-z]|"tmux "[1-9][0-9].[0-9]|"tmux "[1-9][0-9].[0-9][a-z]) _tmux_conf_ver=2.9;; 292 "tmux 2.9"|"tmux 2.9"[a-z]|"tmux "[3-9].[0-9]|"tmux "[3-9].[0-9][a-z]|"tmux "[1-9][0-9].[0-9]|"tmux "[1-9][0-9].[0-9][a-z]) _tmux_conf_ver=2.9;;
302 "tmux 2."[2-8]) _tmux_conf_ver=2.2;; 293 "tmux 2."[2-8]) _tmux_conf_ver=2.2;;
309 alias tmux="tmux -f '""${HOME}""/.tmux-""${_tmux_conf_ver}"".conf'" 300 alias tmux="tmux -f '""${HOME}""/.tmux-""${_tmux_conf_ver}"".conf'"
310 unset _tmux_conf_ver 301 unset _tmux_conf_ver
311 fi 302 fi
312 303
313 unset _os 304 unset _os
314 unset _os_r
315 unset _uid 305 unset _uid
316 unset i 306 unset i
317 307
318 # reset cursor shape 308 # reset cursor shape
319 # reference: https://conemu.github.io/en/AnsiEscapeCodes.html#Terminal_modes 309 # reference: https://conemu.github.io/en/AnsiEscapeCodes.html#Terminal_modes