diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-06 13:43:18 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-06 13:43:18 +0900 |
commit | f1a96296525975ea7d4c45aebc4fed5117cecb72 (patch) | |
tree | a14e208fed87a5480c27a4fc5f9cda79d527f422 /bin | |
parent | 20230402d087858ca9a93aa8fe53d289f29c1836 (diff) |
[fzf-tmux] Use awk if bc is not found
Fix #3235
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fzf-tmux | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/fzf-tmux b/bin/fzf-tmux index b4c7d1f9..fc08d36d 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 |