function drush_unset_option

8.0.x context.inc drush_unset_option($option, $context = NULL)
6.x context.inc drush_unset_option($option, $context = NULL)
7.x context.inc drush_unset_option($option, $context = NULL)
3.x context.inc drush_unset_option($option, $context = NULL)
4.x context.inc drush_unset_option($option, $context = NULL)
5.x context.inc drush_unset_option($option, $context = NULL)
master context.inc drush_unset_option($option, $context = NULL)

Remove a setting from a specific context.

Parameters

Option to be unset:

Context in which to unset the value in.:

1 call to drush_unset_option()
drush_command_default_options in includes/command.inc
Conditionally include default options based on the command used.

File

includes/context.inc, line 511
The Drush context API implementation.

Code

function drush_unset_option($option, $context = NULL) {
  if ($context != NULL) {
    $cache = &drush_get_context($context);
    if (array_key_exists($option, $cache)) {
      unset($cache[$option]);
    }
  }
  else {
    $contexts = drush_context_names();

    foreach ($contexts as $context) {
      drush_unset_option($option, $context);
    }
  }
}