btrfs-progs: sort main help menu entries

The output of '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.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Daniel Xu 2020-10-30 17:15:20 -07:00 committed by David Sterba
parent 3850054385
commit 3cbb2d630b
1 changed files with 12 additions and 9 deletions

21
btrfs.c
View File

@ -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