mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-11 14:39:28 +02:00
Support __completeNoDesc hidden command (#1922)
The __completeNoDesc command is used by bash to request completion without any descriptions. It must be properly supported for cobra.Command.ValidArgsFunction to work with bash completion. Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
This commit is contained in:
parent
c011943613
commit
e132922d23
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user