Skip to content
Myr

[fzf-tmux] Disallow popup mode on tmux 3.1 or below

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #3198

authored by Junegunn Choi · committed by Junegunn Choi · parent 302e21f · Browse files · 1 file+7 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−4 removed

  • other:+7 added−4 removed

1 file+7 added−4 removed

modified:bin/fzf-tmux+7 added-4 removed
177 unmodified lines
178trap 'cleanup' EXIT179180envs="export TERM=$TERM "181if [[ "$opt" =~ "-E" ]]; then182 tmux_version=$(tmux -V)183 if [[ $tmux_version =~ ^tmux\ 3\.2[a-z]?$ ]]; then184 FZF_DEFAULT_OPTS="--margin 0,1 $FZF_DEFAULT_OPTS"185 else182 tmux_version=$(tmux -V | sed 's/[^0-9.]//g')183 if [[ $(bc -l <<< "$tmux_version > 3.2") = 1 ]]; then184 FZF_DEFAULT_OPTS="--border $FZF_DEFAULT_OPTS"185 opt="-B $opt"186 elif [[ $tmux_version = 3.2 ]]; then187 FZF_DEFAULT_OPTS="--margin 0,1 $FZF_DEFAULT_OPTS"188 else189 echo "fzf-tmux: tmux 3.2 or above is required for popup mode" >&2190 exit 2191 fi192fi193[[ -n "$FZF_DEFAULT_OPTS" ]] && envs="$envs FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS")"194[[ -n "$FZF_DEFAULT_COMMAND" ]] && envs="$envs FZF_DEFAULT_COMMAND=$(printf %q "$FZF_DEFAULT_COMMAND")"
39 unmodified lines