Get input from the user.

  1. 6.x drush/includes/drush.inc userinput
  2. 4.x drush/includes/drush.inc userinput
  3. 5.x drush/includes/drush.inc userinput
  4. 7.x drush/includes/drush.inc userinput

Functions

Namesort descending Location Description
drush_choice drush/includes/drush.inc Ask the user to select an item from a list. From a provided associative array, drush_choice will display all of the questions, numbered from 1 to N, and return the item the user selected. "0" is always cancel; entering a blank line is also…
drush_choice_multiple drush/includes/drush.inc Ask the user to select multiple items from a list. This is a wrapper around drush_choice, that repeats the selection process, allowing users to toggle a number of items in a list. The number of values that can be constrained by both min and max: the…
drush_confirm drush/includes/drush.inc Asks the user a basic yes/no question.
drush_prompt drush/includes/drush.inc Prompt the user for input

File

drush/includes/drush.inc, line 361
The drush API implementation and helpers.