From 6d926dfdc7e49d8651e1f95fb4d6d36965d7cfeb Mon Sep 17 00:00:00 2001 From: Komo <71205197+cattokomo@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:01:51 +0800 Subject: [PATCH] fix parsing fzf version that has spaces Signed-off-by: Komo <71205197+cattokomo@users.noreply.github.com> --- functions/.zsh-prepare-zoxide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/.zsh-prepare-zoxide b/functions/.zsh-prepare-zoxide index b949f65..574330f 100644 --- a/functions/.zsh-prepare-zoxide +++ b/functions/.zsh-prepare-zoxide @@ -29,7 +29,7 @@ done # Check if fzf has minimal required version. if (( ${+commands[fzf]} )); then typeset fzf_version - fzf_version=$(fzf --version | awk -F '.' '{print $2}') + fzf_version=$(fzf --version | awk -F '.' '{print $2}' | awk -F ' ' '{print $1}') if [[ $fzf_version -lt 21 ]]; then print "The fzf version is too old. Please update to version 0.21.0 or higher." print "Note: zoxide only supports fzf v0.21.0 and above."