From 2e46b2a2dcb96cadd94283bdce95eca75bef1433 Mon Sep 17 00:00:00 2001 From: Christophe Bliard Date: Wed, 27 Oct 2021 11:40:09 +0200 Subject: [PATCH] feat(fzf): support getting fzf from nix-darwin (#10355) --- plugins/fzf/fzf.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index a979fe222..aabd62cb1 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -20,7 +20,9 @@ function setup_using_base_dir() { done if [[ -z "${fzf_base}" ]]; then - if (( ${+commands[brew]} )) && dir="$(brew --prefix fzf 2>/dev/null)"; then + if (( ${+commands[fzf-share]} )) && dir="$(fzf-share)" && [[ -d "${dir}" ]]; then + fzf_base="${dir}" + elif (( ${+commands[brew]} )) && dir="$(brew --prefix fzf 2>/dev/null)"; then if [[ -d "${dir}" ]]; then fzf_base="${dir}" fi