| 129 | } |
| 130 | |
| 131 | func zshCompletionLong(programName string) string { |
| 132 | return fmt.Sprintf(`Generate the autocompletion script for the zsh shell. |
| 133 | |
| 134 | If shell completion is not already enabled in your environment you will need |
| 135 | to enable it. You can execute the following once: |
| 136 | |
| 137 | echo "autoload -U compinit; compinit" >> ~/.zshrc |
| 138 | |
| 139 | To load completions in your current shell session: |
| 140 | |
| 141 | source <(%[1]s completion zsh) |
| 142 | |
| 143 | To load completions for every new session, execute once: |
| 144 | |
| 145 | #### Linux: |
| 146 | |
| 147 | %[1]s completion zsh > "${fpath[1]}/_%[1]s" |
| 148 | |
| 149 | #### macOS: |
| 150 | |
| 151 | %[1]s completion zsh > $(brew --prefix)/share/zsh/site-functions/_%[1]s |
| 152 | |
| 153 | You will need to start a new shell for this setup to take effect. |
| 154 | `, programName) |
| 155 | } |
| 156 | |
| 157 | func fishCompletionLong(programName string) string { |
| 158 | return fmt.Sprintf(`Generate the autocompletion script for the fish shell. |