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

Support __completeNoDesc hidden command #1922

Merged
merged 1 commit into from Nov 27, 2020
Merged
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
5 changes: 3 additions & 2 deletions cmd/root.go
Expand Up @@ -87,8 +87,9 @@ func shouldPrependRelease(cmd *cobra.Command, args []string) bool {
return false
}

// allow help and __complete commands.
if len(args) > 0 && (args[0] == "help" || args[0] == "__complete") {
// allow help and the two __complete commands.
if len(args) > 0 && (args[0] == "help" ||
args[0] == cobra.ShellCompRequestCmd || args[0] == cobra.ShellCompNoDescRequestCmd) {
return false
}

Expand Down