[fzf-tmux] Fix version check

The output of `tmux -V` starts with "tmux ".
This commit is contained in:
Junegunn Choi 2023-02-13 15:25:39 +09:00
parent b1619f675f
commit b3bf18b1c0
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -180,7 +180,7 @@ trap 'cleanup' EXIT
envs="export TERM=$TERM "
if [[ "$opt" =~ "-E" ]]; then
tmux_version=$(tmux -V)
if [[ $tmux_version =~ ^3\.2[a-z]?$ ]]; then
if [[ $tmux_version =~ ^tmux\ 3\.2[a-z]?$ ]]; then
FZF_DEFAULT_OPTS="--margin 0,1 $FZF_DEFAULT_OPTS"
else
FZF_DEFAULT_OPTS="--border $FZF_DEFAULT_OPTS"