From f1a96296525975ea7d4c45aebc4fed5117cecb72 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 6 Apr 2023 13:43:18 +0900 Subject: [PATCH] [fzf-tmux] Use awk if bc is not found Fix #3235 --- bin/fzf-tmux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fzf-tmux b/bin/fzf-tmux index b4c7d1f..fc08d36 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -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") = 1 ]]; then + if [[ $(bc -l <<< "$tmux_version > 3.2" 2> /dev/null || awk '{print ($1 > 3.2)}' <<< "$tmux_version") = 1 ]]; then FZF_DEFAULT_OPTS="--border $FZF_DEFAULT_OPTS" opt="-B $opt" elif [[ $tmux_version = 3.2 ]]; then