m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-08 11:23:47 -05:00

[fzf-tmux] Try awk before bc

This commit is contained in:
Junegunn Choi
2023-04-11 16:29:29 +09:00
parent f1a9629652
commit 36b971ee4e

View File

@@ -180,7 +180,7 @@ trap 'cleanup' EXIT
envs="export TERM=$TERM "
if [[ "$opt" =~ "-E" ]]; then
tmux_version=$(tmux -V | sed 's/[^0-9.]//g')
if [[ $(bc -l <<< "$tmux_version > 3.2" 2> /dev/null || awk '{print ($1 > 3.2)}' <<< "$tmux_version") = 1 ]]; then
if [[ $(awk '{print ($1 > 3.2)}' <<< "$tmux_version" 2> /dev/null || bc -l <<< "$tmux_version > 3.2") = 1 ]]; then
FZF_DEFAULT_OPTS="--border $FZF_DEFAULT_OPTS"
opt="-B $opt"
elif [[ $tmux_version = 3.2 ]]; then