Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sourcing zsh completion script #1917

Merged
merged 1 commit into from Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion completions.go
Expand Up @@ -734,7 +734,7 @@ to enable it. You can execute the following once:
To load completions in your current shell session:
source <(%[1]s completion zsh); compdef _%[1]s %[1]s
source <(%[1]s completion zsh)
To load completions for every new session, execute once:
Expand Down
1 change: 1 addition & 0 deletions zsh_completions.go
Expand Up @@ -90,6 +90,7 @@ func genZshComp(buf io.StringWriter, name string, includeDesc bool) {
compCmd = ShellCompNoDescRequestCmd
}
WriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s
compdef _%[1]s %[1]s
# zsh completion for %-36[1]s -*- shell-script -*-
Expand Down