add g as groups alias for system '<id> groups', add 'random member'

This commit is contained in:
dawn 2026-01-20 00:24:58 +03:00
parent 8cad05ccda
commit e1c61d6272
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -5,11 +5,13 @@ use super::*;
pub fn cmds() -> impl Iterator<Item = Command> { pub fn cmds() -> impl Iterator<Item = Command> {
let random = ("random", ["rand"]); let random = ("random", ["rand"]);
let group = group::group(); let group = group::group();
let member = member::member();
[ [
command!(random => "random_self") command!(random => "random_self")
.help("Shows the info card of a randomly selected member in your system") .help("Shows the info card of a randomly selected member in your system")
.flag(group), .flag(group),
command!(random, member => "random_self"),
command!(random, group => "random_group_self") command!(random, group => "random_group_self")
.help("Shows the info card of a randomly selected group in your system"), .help("Shows the info card of a randomly selected group in your system"),
command!(random, group::targeted() => "random_group_member_self") command!(random, group::targeted() => "random_group_member_self")

View file

@ -247,7 +247,7 @@ pub fn edit() -> impl Iterator<Item = Command> {
.map(apply_list_opts); .map(apply_list_opts);
let system_groups_cmd = once( let system_groups_cmd = once(
command!(system, Optional(SystemRef), "groups", search_param => "system_groups") command!(system, Optional(SystemRef), ("groups", ["g"]), search_param => "system_groups")
.help("Lists groups in a system"), .help("Lists groups in a system"),
) )
.map(apply_list_opts); .map(apply_list_opts);