Skip to content

Commit

Permalink
feat(fzf): support fzf setup for 0.48.0 and older (ohmyzsh#12367)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella authored Apr 19, 2024
1 parent d17ca48 commit 1b5503a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion plugins/fzf/fzf.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
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

eval "$(fzf --zsh)"
}

function fzf_setup_using_base_dir() {
local fzf_base fzf_shell fzfdirs dir

Expand Down Expand Up @@ -217,7 +226,8 @@ Please add `export FZF_BASE=/path/to/fzf/install/dir` to your .zshrc
EOF
}

fzf_setup_using_openbsd \
fzf_setup_using_fzf \
|| fzf_setup_using_openbsd \
|| fzf_setup_using_debian \
|| fzf_setup_using_opensuse \
|| fzf_setup_using_cygwin \
Expand Down

0 comments on commit 1b5503a

Please sign in to comment.