shared/verbs: when showing default verb, put [] around the args too

The verb cannot be omitted but the args kept, so:
  resolvectl [status] [link]
is wrong, we need:
  resolvectl [status [link]]

Fixes f94da4b4c5.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-05-07 18:39:04 +02:00
parent d865863929
commit 4e20d61c65
+2 -2
View File
@@ -200,9 +200,9 @@ int _verbs_get_help_table(
r = table_add_cell_stringf(table, NULL, " %s%s%s%s%s",
is_default ? "[" : "",
verb->verb,
is_default ? "]" : "",
verb->argspec ? " " : "",
strempty(verb->argspec));
strempty(verb->argspec),
is_default ? "]" : "");
if (r < 0)
return table_log_add_error(r);