Unverified Commit b0bffcaf authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub

fix(fzf): fix check for true Debian-like in debian setup function (#11460)

Check for `apt` and `apt-get` in debian setup function. Look for exact directory in debian-like setup function. Fixes #11459
parent e55e3f0f
......@@ -50,12 +50,3 @@ Set whether to disable key bindings (CTRL-T, CTRL-R, ALT-C):
```zsh
DISABLE_FZF_KEY_BINDINGS="true"
```
### Skip `dpkg` loading
If you have `dpkg` available in your `$PATH` but you don't want to load `fzf` from there, and facing some
issues, you can define this option before loading `oh-my-zsh` in order to skip that loading:
```zsh
zstyle ':omz:plugins:fzf' skip-dpkg yes
```
......@@ -60,7 +60,7 @@ function fzf_setup_using_base_dir() {
function fzf_setup_using_debian() {
if (( ! $+commands[dpkg] )) || zstyle -t ':omz:plugins:fzf' skip-dpkg; then
if (( ! $+commands[apt] && ! $+commands[apt-get] )); then
# Not a debian based distro
return 1
fi
......@@ -81,7 +81,7 @@ function fzf_setup_using_debian() {
key_bindings="${PREFIX}/share/fzf/key-bindings.zsh"
;;
*)
if [[ ! -f /usr/bin/fzf ]]; then
if [[ ! -d /usr/share/doc/fzf/examples ]]; then
# fzf not installed
return 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment