1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00

fix(fzf): support old fzf versions

Closes #12387
This commit is contained in:
Carlo Sala 2024-04-30 12:56:02 +02:00
parent 803e1a784c
commit 21963f4f67
No known key found for this signature in database
GPG key ID: DA6FB450C1A4FE9A

View file

@ -1,8 +1,10 @@
function fzf_setup_using_fzf() {
(( ${+commands[fzf]} )) || return 1
local fzf_ver=${$(fzf --version)[1]}
is-at-least 0.48.0 $fzf_ver || return 1
# we remove "fzf " prefix, this fixes really old fzf versions behaviour
# see https://github.com/ohmyzsh/ohmyzsh/issues/12387
local fzf_ver=${"$(fzf --version)"#fzf }
is-at-least 0.48.0 ${${(s: :)fzf_ver}[1]} || return 1
eval "$(fzf --zsh)"
}