From 5bb155624659d0c9d1ab50c9f583c1b93045b0ed Mon Sep 17 00:00:00 2001 From: David Bailey <4248177+davidbailey00@users.noreply.github.com> Date: Wed, 20 Jan 2021 12:19:11 +0000 Subject: [PATCH 1/3] Suggest alternative method for enabling ZSH completions --- docs/Shell-Completion.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/Shell-Completion.md b/docs/Shell-Completion.md index b68d23744b..4a029cdd83 100644 --- a/docs/Shell-Completion.md +++ b/docs/Shell-Completion.md @@ -43,7 +43,12 @@ if type brew &>/dev/null; then fi ``` -This must be done before `compinit` is called. Note that if you are using Oh My Zsh, it will call `compinit` for you, so this must be done before you call `oh-my-zsh.sh`. +This must be done before `compinit` is called. Note that if you are using Oh My Zsh, it will call `compinit` for you, so this must be done before you call `oh-my-zsh.sh`. This may be done by adding the following line to your `~/.zprofile` file, instead of modifying your `~/.zshrc` as above: + +```diff + eval $(/opt/homebrew/bin/brew shellenv) ++ export FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH +``` You may also need to forcibly rebuild `zcompdump`: From a04b4890a9185088af9d1664ba044d91e05697c7 Mon Sep 17 00:00:00 2001 From: David Bailey <4248177+davidbailey00@users.noreply.github.com> Date: Wed, 20 Jan 2021 15:24:51 +0000 Subject: [PATCH 2/3] Remove unneeded `export` Co-authored-by: Mike McQuaid --- docs/Shell-Completion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Shell-Completion.md b/docs/Shell-Completion.md index 4a029cdd83..f3a14cad13 100644 --- a/docs/Shell-Completion.md +++ b/docs/Shell-Completion.md @@ -47,7 +47,7 @@ This must be done before `compinit` is called. Note that if you are using Oh My ```diff eval $(/opt/homebrew/bin/brew shellenv) -+ export FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH ++ FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH ``` You may also need to forcibly rebuild `zcompdump`: From 39cdf234a25f2e8a624e3f6a39a16826e7a88a6e Mon Sep 17 00:00:00 2001 From: David Bailey <4248177+davidbailey00@users.noreply.github.com> Date: Wed, 20 Jan 2021 15:30:03 +0000 Subject: [PATCH 3/3] Remove diff formatting (keep only relevant line) + clarify to append the line after initialization --- docs/Shell-Completion.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/Shell-Completion.md b/docs/Shell-Completion.md index f3a14cad13..e30de1f8f1 100644 --- a/docs/Shell-Completion.md +++ b/docs/Shell-Completion.md @@ -43,11 +43,10 @@ if type brew &>/dev/null; then fi ``` -This must be done before `compinit` is called. Note that if you are using Oh My Zsh, it will call `compinit` for you, so this must be done before you call `oh-my-zsh.sh`. This may be done by adding the following line to your `~/.zprofile` file, instead of modifying your `~/.zshrc` as above: +This must be done before `compinit` is called. Note that if you are using Oh My Zsh, it will call `compinit` for you, so this must be done before you call `oh-my-zsh.sh`. This may be done by appending the following line to your `~/.zprofile` after Homebrew's initialization, instead of modifying your `~/.zshrc` as above: -```diff - eval $(/opt/homebrew/bin/brew shellenv) -+ FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH +```sh +FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH ``` You may also need to forcibly rebuild `zcompdump`: