4
require_once dirname(__FILE__).'/../__init_script__.php';
6
$args = new PhutilArgumentParser($argv);
7
$args->setTagline('test console prompting');
8
$args->setSynopsis(<<<EOHELP
9
**prompt.php** __options__
10
Test console prompting.
13
$args->parseStandardArguments();
20
'help' => 'Use specified history __file__.',
25
'default' => 'Enter some text:',
26
'help' => 'Change the prompt text to __text__.',
30
$result = phutil_console_prompt(
31
$args->getArg('prompt'),
32
$args->getArg('history'));
34
$console = PhutilConsole::getConsole();
35
$console->writeOut("Input is: %s\n", $result);