From c61ca24643b0789018f54f47c1d8f6b9335f6e17 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Wed, 28 Feb 2024 03:20:33 -0800 Subject: [PATCH] gz.in: sort list of commands alphabetically Signed-off-by: Steve Peters --- src/gz.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gz.in b/src/gz.in index 14e456f..7f38bea 100755 --- a/src/gz.in +++ b/src/gz.in @@ -185,7 +185,8 @@ usage = 'The \'gz\' command provides a command line interface to the Gazebo'\ # Used to align the commands and the description. padding_width = 15 -commands.each do |cmd, versions| +commands.keys.sort.each do |cmd| + versions = commands[cmd] # Calculate the padding to add between the command and the description. padding_to_apply = padding_width - cmd.size - 1 padding = ''