Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ef650dd

Browse filesBrowse files
committed
Escape command usage when displaying it in the text descriptor
1 parent b43bdf3 commit ef650dd
Copy full SHA for ef650dd

File tree

Expand file treeCollapse file tree

3 files changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-7
lines changed

‎src/Symfony/Component/Console/Descriptor/TextDescriptor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Descriptor/TextDescriptor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected function describeCommand(Command $command, array $options = array())
143143
$this->writeText('<comment>Usage:</comment>', $options);
144144
foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) {
145145
$this->writeText("\n");
146-
$this->writeText(' '.$usage, $options);
146+
$this->writeText(' '.OutputFormatter::escape($usage), $options);
147147
}
148148
$this->writeText("\n");
149149

‎src/Symfony/Component/Console/Tests/Fixtures/command_2.txt

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/command_2.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<comment>Usage:</comment>
2-
descriptor:command2 [options] [--] <argument_name>
3-
descriptor:command2 -o|--option_name <argument_name>
4-
descriptor:command2 <argument_name>
2+
descriptor:command2 [options] [--] \<argument_name>
3+
descriptor:command2 -o|--option_name \<argument_name>
4+
descriptor:command2 \<argument_name>
55

66
<comment>Arguments:</comment>
77
<info>argument_name</info>

‎src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.txt

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Tests/Fixtures/command_mbstring.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<comment>Usage:</comment>
2-
descriptor:åèä [options] [--] <argument_åèä>
3-
descriptor:åèä -o|--option_name <argument_name>
4-
descriptor:åèä <argument_name>
2+
descriptor:åèä [options] [--] \<argument_åèä>
3+
descriptor:åèä -o|--option_name \<argument_name>
4+
descriptor:åèä \<argument_name>
55

66
<comment>Arguments:</comment>
77
<info>argument_åèä</info>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.