diff options
| author | Marc Cornellà <marc@mcornella.com> | 2024-04-19 21:57:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-19 21:57:46 +0200 |
| commit | 1b5503a3eefeb3e248bbc07a2f4e4b7591924307 (patch) | |
| tree | 79cfe20fb48ed63aa50ffa2096d618670b8b182e /plugins/fzf | |
| parent | d17ca487a4357923d8b8681b9e40c2bb2d2fadea (diff) | |
| download | zsh-1b5503a3eefeb3e248bbc07a2f4e4b7591924307.tar.gz zsh-1b5503a3eefeb3e248bbc07a2f4e4b7591924307.tar.bz2 zsh-1b5503a3eefeb3e248bbc07a2f4e4b7591924307.zip | |
feat(fzf): support fzf setup for 0.48.0 and older (#12367)
Fixes #12355
Diffstat (limited to 'plugins/fzf')
| -rw-r--r-- | plugins/fzf/fzf.plugin.zsh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 9e372f498..ac4370596 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -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 @@ -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 \ |
