Skip to content

Commit

Permalink
Changing how arguments are shown in help output.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 14, 2010
1 parent 3e1554f commit 037bc6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions cake/console/console_input_argument.php
Expand Up @@ -90,6 +90,7 @@ public function usage() {
if (!empty($this->_choices)) {
$name = implode('|', $this->_choices);
}
$name = '<' . $name . '>';
if (!$this->isRequired()) {
$name = '[' . $name . ']';
}
Expand Down
6 changes: 3 additions & 3 deletions cake/tests/cases/console/console_option_parser.test.php
Expand Up @@ -407,7 +407,7 @@ function testHelpWithOptionsAndArguments() {
$result = $parser->help();
$expected = <<<TEXT
<info>Usage:</info>
cake mycommand [-h] [--test] model [other_longer]
cake mycommand [-h] [--test] <model> [<other_longer>]
<info>Options:</info>
Expand Down Expand Up @@ -455,7 +455,7 @@ function testHelpWithChoices() {
$result = $parser->help();
$expected = <<<TEXT
<info>Usage:</info>
cake mycommand [-h] [--test one|two] aco|aro [other_longer]
cake mycommand [-h] [--test one|two] <aco|aro> [<other_longer>]
<info>Options:</info>
Expand Down Expand Up @@ -488,7 +488,7 @@ function testHelpDescriptionAndEpilog() {
Description text
<info>Usage:</info>
cake mycommand [-h] [--test] model
cake mycommand [-h] [--test] <model>
<info>Options:</info>
Expand Down

0 comments on commit 037bc6c

Please sign in to comment.