浏览代码

feat(fzf): add `skip-dpkg` flag to avoid some regressions

See https://github.com/ohmyzsh/ohmyzsh/pull/11122#issuecomment-1399607430
Carlo Sala 2 年之前
父节点
当前提交
a1c54e03f9
共有 2 个文件被更改,包括 11 次插入2 次删除
  1. 9 0
      plugins/fzf/README.md
  2. 2 2
      plugins/fzf/fzf.plugin.zsh

+ 9 - 0
plugins/fzf/README.md

@@ -50,3 +50,12 @@ Set whether to disable key bindings (CTRL-T, CTRL-R, ALT-C):
 ```zsh
 ```zsh
 DISABLE_FZF_KEY_BINDINGS="true"
 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
+```

+ 2 - 2
plugins/fzf/fzf.plugin.zsh

@@ -60,8 +60,8 @@ function fzf_setup_using_base_dir() {
 
 
 
 
 function fzf_setup_using_debian() {
 function fzf_setup_using_debian() {
-  if (( ! $+commands[dpkg] )); then
-    # Not a debian based distro
+  if (( ! $+commands[dpkg] )) || zstyle -t ':omz:plugins:fzf' skip-dpkg; then
+    # Not a debian based distro 
     return 1
     return 1
   fi
   fi