ソースを参照

Merge pull request #468 from gierens/homebrew-zsh-comp

docs(readme): add zsh with homebrew part to completions section
Christina Sørensen 2 年 前
コミット
96aefcb3e4
1 ファイル変更19 行追加0 行削除
  1. 19 0
      README.md

+ 19 - 0
README.md

@@ -265,6 +265,25 @@ echo 'export FPATH="<path_to_eza>/completions/zsh:$FPATH"' >> ~/.zshrc
 source ~/.zshrc
 source ~/.zshrc
 ```
 ```
 
 
+
+#### For zsh with homebrew:
+
+In case zsh completions don't work out of the box with homebrew, add the
+following to your `~/.zshrc`:
+
+```bash
+if type brew &>/dev/null; then
+    FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
+    autoload -Uz compinit
+    compinit
+fi
+```
+
+For reference:
+- https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh
+- https://github.com/Homebrew/brew/issues/8984
+
+
 ---
 ---
 
 
 Click sections to expand.
 Click sections to expand.