HomeFreeBSD

cmd: add 'help' subcommand to zpool and zfs

Description

cmd: add 'help' subcommand to zpool and zfs

'program help subcommand' is a reasonably common pattern for
multifunction command-line programs. This commit adds support for that
style to the zpool and zfs commands.

When run as 'zpool help [<topic>]' or 'zfs help [<topic>]', executes the
'man' program on the PATH with the most likely manpage name for the
requested topic: "zpool-<topic>" or "zfs-<topic>" for subcommands, or
"zpool<topic>" or "zfs<topic>" for the "concepts" and "props" topics.
If no topic is supplied, uses the top "zpool" or "zfs" pages.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Kay Pedersen <mail@mkwg.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #15288

Details

Provenance
rob.norris_klarasystems.comAuthored on Sep 19 2023, 4:06 PM
GitHub <noreply@github.com>Committed on Sep 19 2023, 4:06 PM
Parents
rG2076011e0c4c: Fix incorrect expected error in ztest
Branches
Unknown
Tags
Unknown