feat(command_parser): allow aliases in flags

This commit is contained in:
dusk 2025-01-22 00:50:17 +09:00
parent bf5e448aad
commit ff6dc12cae
No known key found for this signature in database
4 changed files with 51 additions and 17 deletions

View file

@ -4,7 +4,7 @@ pub fn cmds() -> impl Iterator<Item = Command> {
let help = ["help", "h"];
[
command!([help] => "help")
.value_flag("foo", OpaqueString) // todo: just for testing
.flag(("foo", OpaqueString)) // todo: just for testing
.help("Shows the help command"),
command!([help, "commands"] => "help_commands").help("help commands"),
command!([help, "proxy"] => "help_proxy").help("help proxy"),