mirror of
https://github.com/spf13/cobra
synced 2025-05-07 05:47:26 +00:00
remove oly mention.
This commit is contained in:
parent
68363b7740
commit
7d2d55a6d0
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ func writeFishPreamble(cmd *Command, buf *bytes.Buffer) {
|
||||||
subCommandNames = append(subCommandNames, subCmd.Name())
|
subCommandNames = append(subCommandNames, subCmd.Name())
|
||||||
})
|
})
|
||||||
buf.WriteString(fmt.Sprintf(`
|
buf.WriteString(fmt.Sprintf(`
|
||||||
function __fish_%s_no_subcommand --description 'Test if oly has yet to be given the subcommand'
|
function __fish_%s_no_subcommand --description 'Test if %s has yet to be given the subcommand'
|
||||||
for i in (commandline -opc)
|
for i in (commandline -opc)
|
||||||
if contains -- $i %s
|
if contains -- $i %s
|
||||||
return 1
|
return 1
|
||||||
|
@ -42,7 +42,7 @@ function __fish_%s_has_flag
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
`, cmd.Name(), strings.Join(subCommandNames, " "), cmd.Name()))
|
`, cmd.Name(), cmd.Name(), strings.Join(subCommandNames, " "), cmd.Name()))
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeFishCommandCompletion(rootCmd, cmd *Command, buf *bytes.Buffer) {
|
func writeFishCommandCompletion(rootCmd, cmd *Command, buf *bytes.Buffer) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue