(binary string, command *Command, siblings []*Command)
| 177 | } |
| 178 | |
| 179 | func fishSubcommandHelper(binary string, command *Command, siblings []*Command) string { |
| 180 | fishHelper := fmt.Sprintf("__fish_%s_no_subcommand", binary) |
| 181 | if len(command.Lineage()) > 1 { |
| 182 | var siblingNames []string |
| 183 | for _, sibling := range siblings { |
| 184 | siblingNames = append(siblingNames, sibling.Names()...) |
| 185 | } |
| 186 | ancestry := commandAncestry(command) |
| 187 | fishHelper = fmt.Sprintf( |
| 188 | "%s; and not __fish_seen_subcommand_from %s", |
| 189 | ancestry, |
| 190 | strings.Join(siblingNames, " "), |
| 191 | ) |
| 192 | } |
| 193 | return fishHelper |
| 194 | } |
| 195 | |
| 196 | func fishFlagHelper(binary string, command *Command) string { |
| 197 | fishHelper := fmt.Sprintf("__fish_%s_no_subcommand", binary) |
no test coverage detected