Fix tmux version parsing for 3.3a

The non-numeric suffix was breaking the bc evaluation. The new
sed expression should just remove anything that isn't a number or decimal
This commit is contained in:
ViViDboarder 2023-02-15 10:33:12 -08:00
parent e101ca0d7e
commit ba6397598f
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ bind C-s command-prompt -p "Send pane to:" "join-pane -t '%%'"
bind C-b break-pane
# based on https://stackoverflow.com/a/40902312/1046584
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | sed 's/[^0-9.]//g')"
# In version 2.1 "mouse" replaced the previous 4 mouse options
if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' \