function drush_input in Module Builder 6.2
Same name and namespace in other branches
- 7 drush/module_builder.drush.inc \drush_input()
Ask the user for input. DOESN'T WORK.
Parameters
$msg The question to ask:
Return value
The entered string.
File
- drush/
module_builder.drush.inc, line 544 - Module builder drush commands.
Code
function drush_input($msg, $required = FALSE, $indent = 0) {
print str_repeat(' ', $indent) . (string) $msg . ": ";
while ($line = trim(fgets(STDIN))) {
if (!$required or strlen($line) > 0) {
return $line;
}
print 'we never get here wtf?';
print str_repeat(' ', $indent) . (string) $msg . ": ";
}
}