refactor(command_parser): simplify how tokens are defined in commands

This commit is contained in:
dusk 2025-01-24 04:08:59 +09:00
parent f804e7629f
commit 071db3d6d6
No known key found for this signature in database
9 changed files with 114 additions and 76 deletions

View file

@ -18,9 +18,7 @@ pub mod server_config;
pub mod switch;
pub mod system;
use command_parser::{
command, command::Command, concat_tokens, parameter::ParameterKind::*, tokens,
};
use command_parser::{command, command::Command, parameter::ParameterKind::*, tokens};
pub fn all() -> impl Iterator<Item = Command> {
(help::cmds())
@ -29,3 +27,5 @@ pub fn all() -> impl Iterator<Item = Command> {
.chain(config::cmds())
.chain(fun::cmds())
}
pub const RESET: (&str, [&str; 2]) = ("reset", ["clear", "default"]);