function _drush_sitealias_user_specified_list

8.0.x _drush_sitealias_user_specified_list()
6.x _drush_sitealias_user_specified_list()
7.x _drush_sitealias_user_specified_list()
3.x _drush_sitealias_user_specified_list()
4.x _drush_sitealias_user_specified_list()
5.x _drush_sitealias_user_specified_list()
master _drush_sitealias_user_specified_list()

Return the list of sites (aliases or local) that the user specified on the command line. If none were specified, then all are returned.

1 call to _drush_sitealias_user_specified_list()
drush_sitealias_print in commands/core/
Print out the specified site aliases using the format specified.


commands/core/, line 89
Site alias commands.


function _drush_sitealias_user_specified_list() {
  $command = drush_get_command();
  $specifications = $command['arguments'];
  $site_list = array();

  // Did the user specify --short or --full output?
  $specified_output_style = drush_get_option(array('full', 'short'), FALSE);

  // Iterate over the arguments and convert them to alias records
  if (!empty($specifications)) {
    $site_list = drush_sitealias_resolve_sitespecs($specifications);
    if (!$specified_output_style) {
      drush_set_option('full', TRUE);
  // If the user provided no args, then we will return everything.
  else {
    $site_list = _drush_sitealias_all_list();

    // Filter out the hidden items
    foreach ($site_list as $site_name => $one_site) {
      if (array_key_exists('#hidden', $one_site)) {

  return $site_list;