ruptime: use mutex arg group for sorting flags
Build and test / build (push) Successful in 1m38s
Build and test / test (push) Successful in 2m9s
Build and test / check (push) Successful in 2m13s
Build and test / docs (push) Successful in 3m35s

This commit is contained in:
2026-07-20 20:57:51 +09:00
parent 219e4f7cdf
commit f825d3761d
+4 -8
View File
@@ -32,7 +32,7 @@ pub struct Args {
uptime_timeout: u32,
/// Sort by load average.
#[arg(long, short, conflicts_with = "time", conflicts_with = "users")]
#[arg(long, short, group = "sort_mode")]
load: bool,
/// Reverses the sort order.
@@ -40,11 +40,11 @@ pub struct Args {
reverse: bool,
/// Sort by uptime.
#[arg(long, short, conflicts_with = "load", conflicts_with = "users")]
#[arg(long, short, group = "sort_mode")]
time: bool,
/// Sort by number of users.
#[arg(long, short, conflicts_with = "load", conflicts_with = "time")]
#[arg(long, short, group = "sort_mode")]
users: bool,
/// Print the output with the old formatting
@@ -52,11 +52,7 @@ pub struct Args {
old: bool,
/// Output in JSON format
#[arg(
long,
short,
conflicts_with_all = ["load", "reverse", "time", "users"]
)]
#[arg(long, short, conflicts_with_all = ["sort_mode", "reverse"])]
json: bool,
/// Generate shell completion scripts for the specified shell