Commit Graph

5 Commits

Author SHA1 Message Date
Dominik Csapak
237b317678 router: sort cli properties in usage output
If we don't do this, then properties from a serde flattened struct will
be positioned at the end of the list, rather than properly sorted with
the other properties.

Since the tests also feature non-sorted properties, we have to adapt
them too.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-08-30 13:26:13 +02:00
Maximiliano Sandoval
c8b975799b fix typos in strings
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-07-22 08:49:42 +02:00
Wolfgang Bumiller
95c0614ccd router: cli: improve doc-gen global options handling
Passing the &GlobalOptions through is more telling than an opaque
Iterator<&str>...

Also: actually generate the property descriptions in non-ReST mode for
global options as well, so the `help` output for a specific command
includes the property documentation instead of only showing the name.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-17 13:43:37 +02:00
Wolfgang Bumiller
d872eb9d7e router: cli: rework newline handling for doc and help output
The rules are as follows:
- An "item" by itself does neither start nor end with a newline.
- Where items are connected, the appropriate amount of newlines must
  be inserted, assuming items do not have any trailing newlines.

Otherwise this just gets WAY too confusing everywhere!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-17 13:43:37 +02:00
Wolfgang Bumiller
667fa6bc6b router: cli: doc generation with global options
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-17 13:43:37 +02:00