Skip to content

Commit

Permalink
sort commands by name
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Jan 12, 2014
1 parent 34cff29 commit a2b954b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Commands.pm
Expand Up @@ -95,7 +95,7 @@ sub run {
# Print list of all available commands
my $max = max map { length $_->[0] } @commands;
print $self->message;
for my $command (@commands) {
for my $command (sort { $a->[0] cmp $b->[0] } @commands) {
my $name = $command->[0];
my $description = $command->[1]->new->description;
print " $name", (' ' x ($max - length $name)), " $description";
Expand Down

0 comments on commit a2b954b

Please sign in to comment.