diff mbox series

btrfs-progs: Sort main help menu

Message ID e54b68968ee84f69fac0aa58db8495b99c845a82.1604103293.git.dxu@dxuuu.xyz (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: Sort main help menu | expand

Commit Message

Daniel Xu Oct. 31, 2020, 12:15 a.m. UTC
`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(-)

Comments

Daniel Xu Nov. 11, 2020, 1:36 a.m. UTC | #1
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
Josef Bacik Nov. 13, 2020, 8:34 p.m. UTC | #2
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
David Sterba Dec. 1, 2020, 5:13 p.m. UTC | #3
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 mbox series

Patch

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