client/show-privs: allow showing single char hints in table output
All checks were successful
Build and test / check (push) Successful in 1m44s
Build and test / build (push) Successful in 3m24s
Build and test / test (push) Successful in 3m28s
Build and test / check-license (push) Successful in 4m54s
Build and test / docs (push) Successful in 6m43s

This commit is contained in:
2025-12-14 15:58:02 +09:00
parent 56596835fa
commit 7b79f7b163
3 changed files with 41 additions and 3 deletions

View File

@@ -27,6 +27,12 @@ pub struct ShowPrivsArgs {
#[arg(short, long)]
json: bool,
/// Show single-character privilege names in addition to human-readable names
///
/// This flag has no effect when used with --json
#[arg(short, long)]
long: bool,
/// Return a non-zero exit code if any of the results were erroneous
#[arg(short, long)]
fail: bool,
@@ -67,7 +73,7 @@ pub async fn show_database_privileges(
if args.json {
print_list_privileges_output_status_json(&privilege_data);
} else {
print_list_privileges_output_status(&privilege_data);
print_list_privileges_output_status(&privilege_data, args.long);
}
if args.fail && privilege_data.values().any(|res| res.is_err()) {