]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/verbs: show list of verbs when missing 32396/head
authorMike Yuan <me@yhndnzj.com>
Mon, 22 Apr 2024 09:40:53 +0000 (17:40 +0800)
committerMike Yuan <me@yhndnzj.com>
Mon, 22 Apr 2024 12:42:35 +0000 (20:42 +0800)
commitadaf1f7ea38798d4ddbb3cff6513188fd6e98c9e
tree38fc034399cedd5a65b8b5b70e8c76cb27f8ffcf
parent48fb49f1bdcae3c977883fe267d06c2e4a823046
shared/verbs: show list of verbs when missing

Replaces #32062

As discussed in #32062, making 'help' the default verb
is not very appealing for two reasons:

1) If the verb is missing, showing a help which is pages long
   isn't really helpful to locate the problem.
   (https://github.com/systemd/systemd/pull/32062#issuecomment-2064997158)

2) We want to reserve the right to set default verbs to be
   more useful ones, instead of help. E.g. 'busctl' lists all
   bus peers by default.

So, when there are more than 2 verbs, let's instead add
the list of available verbs to the "Command verb required"
message, that serves as a hint. That way we try to be friendlier
to users, but still make the problem obvious.
src/shared/verbs.c