diff --git a/README.md b/README.md index b1934ad486..b09671e022 100644 --- a/README.md +++ b/README.md @@ -4366,6 +4366,10 @@ $ just --completions zsh > just.zsh Please refer to your shell's documentation for how to install them. +#### Zsh + +##### Homebrew (MacOS) + *macOS Note:* Recent versions of macOS use zsh as the default shell. If you use Homebrew to install `just`, it will automatically install the most recent copy of the zsh completion script in the Homebrew zsh directory, which the built-in @@ -4392,6 +4396,29 @@ fpath=($HOMEBREW_PREFIX/share/zsh/site-functions $fpath) # compinit ``` +##### oh-my-zsh + +oh-my-zsh is set up to load completion scripts found in `$HOME/.oh-my-zsh/completions`. +This is intended for completion script not included in plugins. + +Check that `$fpath` target this folder. +```shell +local ZSH_COMPLETIONS_DIR="$HOME/.oh-my-zsh/completions" +echo $fpath | grep "$ZSH_COMPLETIONS_DIR" +``` + +If so, create the folder if not existing. +```shell +mkdir --parents $ZSH_COMPLETIONS_DIR +``` + +Generate and store the completion script. +```shell +just --completions zsh > "${ZSH_COMPLETIONS_DIR}/_just" +``` + +Logout + ### Man Page `just` can print its own man page with `just --man`. Man pages are written in