Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Sort main help menu
@ 2020-10-31  0:15 Daniel Xu
  2020-11-11  1:36 ` Daniel Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Xu @ 2020-10-31  0:15 UTC (permalink / raw)
  To: linux-btrfs, dsterba; +Cc: Daniel Xu, kernel-team

`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(-)

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-01 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-31  0:15 [PATCH] btrfs-progs: Sort main help menu Daniel Xu
2020-11-11  1:36 ` Daniel Xu
2020-11-13 20:34 ` Josef Bacik
2020-12-01 17:13 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox