Skip to content

Commit 5738d6b

Browse files
authored
Add install instructions for zsh on Mac OS (#1417)
zsh is now the default on Mac OS, but the $_fpath version of the installation instructions are likely to put the completion in a strange location that the user might not expect (e.g. an oh-my-zsh plugin's function directory). So, since Mac OS seems to (as far as I can tell) provide a stable location, this PR recommends using that path instead.
1 parent 5d46ac9 commit 5738d6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

completions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,10 @@ to enable it. You can execute the following once:
638638
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
639639
640640
To load completions for every new session, execute once:
641+
# Linux:
641642
$ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
643+
# macOS:
644+
$ %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s
642645
643646
You will need to start a new shell for this setup to take effect.
644647
`, c.Root().Name()),

0 commit comments

Comments
 (0)