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

Already on GitHub? Sign in to your account

Console Prompt Literal String #2587

zfbot opened this Issue Sep 28, 2012 · 2 comments


None yet
3 participants

zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-561
Issue Type:Improvement


By using the example below I would have expected to be presented with the prompt (does happen) and then I would need to actually type "yes" to continue. Instead, as soon as you key in Y it confirms.

Testing further it appears the prompt only looks for the first character of the defined Char to be entered, if matched then it does what it needs to.

To avoid someone reaching this prompt by accident and keying in Y for Yes, I'd rather be on the safe side and make certain they actually typed Yes.

$confirm = new \Zend\Console\Prompt\Confirm();
$confirm->setPromptText('Are you sure you want to continue?');

$result = $confirm->show();

if ($result) {
echo 'Confirmed';

zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at

Known GitHub users mentioned in the original message or comment:
@diemuzi, @weierophinney


diemuzi commented Sep 28, 2012

Please close, not an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment