fzf: check for dpkg before checking for fzf in debian
Fixes #8253
Co-authored-by: Mariusz B <mb@binary-offensive.com>
Diff
1diff --git a/plugins/fzf/fzf.plugin.zsh b/plugins/fzf/fzf.plugin.zsh
2index 646148297735efac1e3c68275300aec30682d655..f701fdf3252e7dd8e3a7f8f78313f4c3f3aad313 100644
3--- a/plugins/fzf/fzf.plugin.zsh
4+++ b/plugins/fzf/fzf.plugin.zsh
5@@ -1,9 +1,9 @@
6 function setup_using_base_dir() {
7- # Declare all variables local not no mess with outside env in any way
8- local fzf_base
9- local fzf_shell
10- local fzfdirs
11- local dir
12+ # Declare all variables local not no mess with outside env in any way
13+ local fzf_base
14+ local fzf_shell
15+ local fzfdirs
16+ local dir
1718 test -d "${FZF_BASE}" && fzf_base="${FZF_BASE}"
1920@@ -58,7 +58,7 @@ function setup_using_base_dir() {
212223 function setup_using_debian_package() {
24- dpkg -s fzf &> /dev/null
25+ (( $+command[dpkg] )) && dpkg -s fzf &> /dev/null
26 if (( $? )); then
27 # Either not a debian based distro, or no fzf installed. In any case skip ahead
28 return 1