implement random commands, dont keep the subcommands only the flags

This commit is contained in:
dusk 2025-09-26 23:56:49 +00:00
parent c00ff2f371
commit c92c3f84f0
No known key found for this signature in database
13 changed files with 82 additions and 24 deletions

View file

@ -1,12 +1,22 @@
use command_parser::token::TokensIterator;
use super::*;
pub fn cmds() -> impl Iterator<Item = Command> {
edit()
}
pub fn system() -> (&'static str, [&'static str; 1]) {
("system", ["s"])
}
pub fn targeted() -> TokensIterator {
tokens!(system(), SystemRef)
}
pub fn edit() -> impl Iterator<Item = Command> {
let system = ("system", ["s"]);
let system_target = tokens!(system, SystemRef);
let system = system();
let system_target = targeted();
let system_new = tokens!(system, ("new", ["n"]));
let system_new_cmd = [