Skip to content

Commit

Permalink
chore(fish): Add FIXME
Browse files Browse the repository at this point in the history
About inabilities of handling nested subcommands more than 3 levels,
which I think not practical in public. Take rustup for example,
`rustup toolchain install <version>`, there is only 3 levels of nested
subcommands. But there is also the case of `rustup help toolchain install`,
or `rustup toolchain help install`.
  • Loading branch information
tesuji committed Jul 6, 2024
1 parent a6ac45f commit f1182cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clap_complete/src/shells/fish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ fn gen_fish_inner(
[command, subcommand] => out.push_str(&format!(
" {command}; and __fish_seen_subcommand_from {subcommand}"
)),
// FIXME: Create an `__fish_{name}_help_using_command` to check for help of subcommands of subcommand?
[command, "help", _subcommand] => {
out.push_str(&format!(" {command}; and __fish_seen_subcommand_from help"));
}
// FIXME: Create an `__fish_help_{name}_using_command` to check for help of `{name}` subcommand?
["help", command, _subcommand] => {
out.push_str(&format!(" help; and __fish_seen_subcommand_from {command}"));
}
Expand Down

0 comments on commit f1182cb

Please sign in to comment.