From 74e30b0708f3fca63f0815ae7a49b274a2fd2561 Mon Sep 17 00:00:00 2001 From: xuwu Date: Tue, 7 Jun 2022 11:35:51 +0800 Subject: [PATCH 1/2] Modify brew prefix path in macOS system --- completions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions.go b/completions.go index ce1caab82..3de4e87a1 100644 --- a/completions.go +++ b/completions.go @@ -652,7 +652,7 @@ To load completions for every new session, execute once: #### macOS: - %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s + %[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s You will need to start a new shell for this setup to take effect. `, c.Root().Name()), @@ -689,7 +689,7 @@ To load completions for every new session, execute once: #### macOS: - %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s + %[1]s completion zsh > $(brew --prefix)/share/zsh/site-functions/_%[1]s You will need to start a new shell for this setup to take effect. `, c.Root().Name()), From 7f3e13f388bbd3097b600d182c2d7eb6e250f36a Mon Sep 17 00:00:00 2001 From: xuwu Date: Mon, 13 Jun 2022 09:29:42 +0800 Subject: [PATCH 2/2] docs: update bash completion prefix --- shell_completions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell_completions.md b/shell_completions.md index be17bf8c3..1e2058ed6 100644 --- a/shell_completions.md +++ b/shell_completions.md @@ -40,7 +40,7 @@ Bash: # Linux: $ %[1]s completion bash > /etc/bash_completion.d/%[1]s # macOS: - $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s + $ %[1]s completion bash > $(brew --prefix)/etc/bash_completion.d/%[1]s Zsh: