Skip to content

Commit

Permalink
Display sorted command list
Browse files Browse the repository at this point in the history
  • Loading branch information
rchavik committed Sep 17, 2017
1 parent b85ef39 commit a931060
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Shell/HelpShell.php
Expand Up @@ -73,15 +73,19 @@ public function main()
}

if (!$this->commands) {
$this->commands = $this->getCommands();
$this->commands = new CommandCollection($this->getCommands());
}

$commands = $this->commands->getIterator();
$commands->ksort();
$commands = new CommandCollection((array)$commands);

if ($this->param('xml')) {
$this->asXml($this->commands);
$this->asXml($commands);

return;
}
$this->asText($this->commands);
$this->asText($commands);
}

/**
Expand Down

0 comments on commit a931060

Please sign in to comment.