From f56b678888c0ad4ac71458680d75d88b442cf09b Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 15 Oct 2019 16:51:51 +0200 Subject: fzf: check for dpkg before checking for fzf in debian Fixes #8253 Co-authored-by: Mariusz B --- plugins/fzf/fzf.plugin.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/fzf') diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index 646148297..f701fdf32 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -1,9 +1,9 @@ function setup_using_base_dir() { - # Declare all variables local not no mess with outside env in any way - local fzf_base - local fzf_shell - local fzfdirs - local dir + # Declare all variables local not no mess with outside env in any way + local fzf_base + local fzf_shell + local fzfdirs + local dir test -d "${FZF_BASE}" && fzf_base="${FZF_BASE}" @@ -58,7 +58,7 @@ function setup_using_base_dir() { function setup_using_debian_package() { - dpkg -s fzf &> /dev/null + (( $+command[dpkg] )) && dpkg -s fzf &> /dev/null if (( $? )); then # Either not a debian based distro, or no fzf installed. In any case skip ahead return 1 -- cgit v1.2.3-70-g09d2 From 563c0708ab7100c23aab218a9053a61d81fe1317 Mon Sep 17 00:00:00 2001 From: Jakub Łuczyński Date: Wed, 16 Oct 2019 17:59:06 +0200 Subject: fzf: fix regression (#8269) Typo introduced in f56b678 fixing #8253 --- plugins/fzf/fzf.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/fzf') diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh index f701fdf32..fe471a363 100644 --- a/plugins/fzf/fzf.plugin.zsh +++ b/plugins/fzf/fzf.plugin.zsh @@ -58,7 +58,7 @@ function setup_using_base_dir() { function setup_using_debian_package() { - (( $+command[dpkg] )) && dpkg -s fzf &> /dev/null + (( $+commands[dpkg] )) && dpkg -s fzf &> /dev/null if (( $? )); then # Either not a debian based distro, or no fzf installed. In any case skip ahead return 1 -- cgit v1.2.3-70-g09d2