8000 [Console] Use readline for user input when available #DX by michaelperrin · Pull Request #15382 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Use readline for user input when available #DX #15382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Console] Fix Symfony coding standards violations
  • Loading branch information
Michaël Perrin authored and michaelperrin committed Aug 1, 2015
commit 05348991c263e714aac848b119e99d2f8ff77507
8 changes: 4 additions & 4 deletions src/Symfony/Component/Console/Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function setInputStream($stream)
}

/**
* Returns the helper's input stream
* Returns the helper's input stream.
*
* @return resource
*/
Expand Down Expand Up @@ -146,7 +146,7 @@ public function doAsk(OutputInterface $output, Question $question)
* Outputs the question prompt.
*
* @param OutputInterface $output
* @param Question $question
* @param Question $question
*/
protected function writePrompt(OutputInterface $output, Question $question)
{
Expand Down Expand Up @@ -218,7 +218,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
// Backspace Character
if ("\177" === $c) {
if (0 === $numMatches && 0 !== $i) {
$i--;
--$i;
// Move cursor backwards
$output->write("\033[1D");
}
Expand Down Expand Up @@ -271,7 +271,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
} else {
$output->write($c);
$ret .= $c;
$i++;
++$i;

$numMatches = 0;
$ofs = 0;
Expand Down
0