From f1182cba7ad18e9a10f38c76a1a3ded1c4502495 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Sat, 6 Jul 2024 07:47:25 +0700 Subject: [PATCH] chore(fish): Add FIXME About inabilities of handling nested subcommands more than 3 levels, which I think not practical in public. Take rustup for example, `rustup toolchain install `, there is only 3 levels of nested subcommands. But there is also the case of `rustup help toolchain install`, or `rustup toolchain help install`. --- clap_complete/src/shells/fish.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clap_complete/src/shells/fish.rs b/clap_complete/src/shells/fish.rs index 087be3ea821..65b4ae6c259 100644 --- a/clap_complete/src/shells/fish.rs +++ b/clap_complete/src/shells/fish.rs @@ -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}")); }