Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Console] respect multi-character shortcuts
The `TextDescriptor` assumed that shortcuts will only consume one space when calculating the maximum width needed to display the option's synopsis.
- Loading branch information
Showing
6 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/Symfony/Component/Console/Tests/Fixtures/input_option_6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"--option_name","shortcut":"-o|-O","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"option with multiple shortcuts","default":null} |
9 changes: 9 additions & 0 deletions
9
src/Symfony/Component/Console/Tests/Fixtures/input_option_6.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**option_name:** | ||
|
||
* Name: `--option_name` | ||
* Shortcut: `-o|-O` | ||
* Accept value: yes | ||
* Is value required: yes | ||
* Is multiple: no | ||
* Description: option with multiple shortcuts | ||
* Default: `NULL` |
1 change: 1 addition & 0 deletions
1
src/Symfony/Component/Console/Tests/Fixtures/input_option_6.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<info>-o|O, --option_name=OPTION_NAME</info> option with multiple shortcuts |
5 changes: 5 additions & 0 deletions
5
src/Symfony/Component/Console/Tests/Fixtures/input_option_6.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<option name="--option_name" shortcut="-o" shortcuts="-o|-O" accept_value="1" is_value_required="1" is_multiple="0"> | ||
<description>option with multiple shortcuts</description> | ||
<defaults/> | ||
</option> |