Message ID | e54b68968ee84f69fac0aa58db8495b99c845a82.1604103293.git.dxu@dxuuu.xyz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: Sort main help menu | expand |
On Fri, Oct 30, 2020, at 5:15 PM, Daniel Xu wrote: > `btrfs help` is quite long and requires scrolling. For someone > who has a vague idea of what a subcommand is called but not quite sure, > alphabetical listing can help them find what they're looking for faster. > > Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> > --- > btrfs.c | 21 ++++++++++++--------- > 1 file changed, 12 insertions(+), 9 deletions(-) > [...] Ping
On 10/30/20 8:15 PM, Daniel Xu wrote: > `btrfs help` is quite long and requires scrolling. For someone > who has a vague idea of what a subcommand is called but not quite sure, > alphabetical listing can help them find what they're looking for faster. > > Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Thanks, Josef
On Fri, Oct 30, 2020 at 05:15:20PM -0700, Daniel Xu wrote: > `btrfs help` is quite long and requires scrolling. For someone > who has a vague idea of what a subcommand is called but not quite sure, > alphabetical listing can help them find what they're looking for faster. > > Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Added to devel, thanks.
diff --git a/btrfs.c b/btrfs.c index 87d64f49..c40ddfa6 100644 --- a/btrfs.c +++ b/btrfs.c @@ -330,21 +330,24 @@ static void handle_special_globals(int shift, int argc, char **argv) static const struct cmd_group btrfs_cmd_group = { btrfs_cmd_group_usage, btrfs_cmd_group_info, { - &cmd_struct_subvolume, - &cmd_struct_filesystem, + /* Keep subcommands alphabetically sorted */ &cmd_struct_balance, - &cmd_struct_device, - &cmd_struct_scrub, &cmd_struct_check, - &cmd_struct_rescue, - &cmd_struct_restore, + &cmd_struct_device, + &cmd_struct_filesystem, &cmd_struct_inspect, &cmd_struct_property, - &cmd_struct_send, - &cmd_struct_receive, - &cmd_struct_quota, &cmd_struct_qgroup, + &cmd_struct_quota, + &cmd_struct_receive, &cmd_struct_replace, + &cmd_struct_rescue, + &cmd_struct_restore, + &cmd_struct_scrub, + &cmd_struct_send, + &cmd_struct_subvolume, + + /* Help and version stay last */ &cmd_struct_help, &cmd_struct_version, NULL
`btrfs help` is quite long and requires scrolling. For someone who has a vague idea of what a subcommand is called but not quite sure, alphabetical listing can help them find what they're looking for faster. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> --- btrfs.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)