Skip to content

Commit 6533268

Browse files
committed
Add note about console autocompletion
1 parent 8bd7e39 commit 6533268

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

components/console/introduction.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,22 @@ convenient for passwords::
312312
false
313313
);
314314

315+
.. versionadded:: 2.2
316+
Autocompletion for questions was added in Symfony 2.2.
317+
318+
You can also specify an array of potential answers for a given question. These
319+
will be autocompleted as the user types::
320+
321+
$dialog = $this->getHelperSet()->get('dialog');
322+
$bundleNames = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
323+
$name = $dialog->ask(
324+
$output,
325+
'Please enter the name of a bundle',
326+
'FooBundle',
327+
$bundleNames
328+
);
329+
330+
315331
.. caution::
316332

317333
When you ask for a hidden response, Symfony will use either a binary, change

0 commit comments

Comments
 (0)