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
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 22 2023, 11:13 PM
Parents
rG9aa1a2878ea9: Fix incorrect expected error in ztest
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG3af63683fe07: cmd: add 'help' subcommand to zpool and zfs (authored by Rob N <robn@despairlabs.com>).Sep 22 2023, 11:13 PM