diff options
| author | Carlo Sala <carlosalag@protonmail.com> | 2024-04-30 12:56:02 +0200 |
|---|---|---|
| committer | Carlo Sala <carlosalag@protonmail.com> | 2024-04-30 12:57:05 +0200 |
| commit | 21963f4f678e69fb3154a1d43a33d531a5b3566d (patch) | |
| tree | e6efb3d82e292249da0e982ae15422387bb0e628 | |
| parent | 803e1a784cd520f101d126b47deea3297e6a82fc (diff) | |
| download | zsh-21963f4f678e69fb3154a1d43a33d531a5b3566d.tar.gz zsh-21963f4f678e69fb3154a1d43a33d531a5b3566d.tar.bz2 zsh-21963f4f678e69fb3154a1d43a33d531a5b3566d.zip | |
fix(fzf): support old `fzf` versions
Closes #12387
| -rw-r--r-- | plugins/fzf/fzf.plugin.zsh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index ac4370596..3d29f1762 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -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)" } |
