mirror of https://github.com/spf13/cobra.git
DisableFlagParsing in bash, zsh, fish, powershell set to true
This commit is contained in:
parent
85e8097390
commit
43e4ad49f7
|
@ -713,6 +713,7 @@ You will need to start a new shell for this setup to take effect.
|
||||||
`, c.Root().Name()),
|
`, c.Root().Name()),
|
||||||
Args: NoArgs,
|
Args: NoArgs,
|
||||||
DisableFlagsInUseLine: true,
|
DisableFlagsInUseLine: true,
|
||||||
|
DisableFlagParsing: true,
|
||||||
ValidArgsFunction: NoFileCompletions,
|
ValidArgsFunction: NoFileCompletions,
|
||||||
RunE: func(cmd *Command, args []string) error {
|
RunE: func(cmd *Command, args []string) error {
|
||||||
return cmd.Root().GenBashCompletionV2(out, !noDesc)
|
return cmd.Root().GenBashCompletionV2(out, !noDesc)
|
||||||
|
@ -748,8 +749,9 @@ To load completions for every new session, execute once:
|
||||||
|
|
||||||
You will need to start a new shell for this setup to take effect.
|
You will need to start a new shell for this setup to take effect.
|
||||||
`, c.Root().Name()),
|
`, c.Root().Name()),
|
||||||
Args: NoArgs,
|
Args: NoArgs,
|
||||||
ValidArgsFunction: NoFileCompletions,
|
DisableFlagParsing: true,
|
||||||
|
ValidArgsFunction: NoFileCompletions,
|
||||||
RunE: func(cmd *Command, args []string) error {
|
RunE: func(cmd *Command, args []string) error {
|
||||||
if noDesc {
|
if noDesc {
|
||||||
return cmd.Root().GenZshCompletionNoDesc(out)
|
return cmd.Root().GenZshCompletionNoDesc(out)
|
||||||
|
@ -776,8 +778,9 @@ To load completions for every new session, execute once:
|
||||||
|
|
||||||
You will need to start a new shell for this setup to take effect.
|
You will need to start a new shell for this setup to take effect.
|
||||||
`, c.Root().Name()),
|
`, c.Root().Name()),
|
||||||
Args: NoArgs,
|
Args: NoArgs,
|
||||||
ValidArgsFunction: NoFileCompletions,
|
DisableFlagParsing: true,
|
||||||
|
ValidArgsFunction: NoFileCompletions,
|
||||||
RunE: func(cmd *Command, args []string) error {
|
RunE: func(cmd *Command, args []string) error {
|
||||||
return cmd.Root().GenFishCompletion(out, !noDesc)
|
return cmd.Root().GenFishCompletion(out, !noDesc)
|
||||||
},
|
},
|
||||||
|
@ -798,8 +801,9 @@ To load completions in your current shell session:
|
||||||
To load completions for every new session, add the output of the above command
|
To load completions for every new session, add the output of the above command
|
||||||
to your powershell profile.
|
to your powershell profile.
|
||||||
`, c.Root().Name()),
|
`, c.Root().Name()),
|
||||||
Args: NoArgs,
|
Args: NoArgs,
|
||||||
ValidArgsFunction: NoFileCompletions,
|
DisableFlagParsing: true,
|
||||||
|
ValidArgsFunction: NoFileCompletions,
|
||||||
RunE: func(cmd *Command, args []string) error {
|
RunE: func(cmd *Command, args []string) error {
|
||||||
if noDesc {
|
if noDesc {
|
||||||
return cmd.Root().GenPowerShellCompletion(out)
|
return cmd.Root().GenPowerShellCompletion(out)
|
||||||
|
|
Loading…
Reference in New Issue