Skip to content

Commit

Permalink
sort commands (#238)
Browse files Browse the repository at this point in the history
* sort commands

* code style fix
  • Loading branch information
smatyas authored and askreet committed Nov 6, 2017
1 parent 4f7a285 commit a0cfe5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/moonshot/command_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def load_commands
command_name = commandify(klass)
@commands[command_name] = klass
end

@commands = @commands.sort_by { |k, _v| k.to_s }.to_h
end

def commandify(klass)
Expand Down

0 comments on commit a0cfe5f

Please sign in to comment.