Drush doesn't detect drupal installation under sites sub-directory I have been using  Drush 4 and 5 with no problem. Now that I have downloaded and installed new Drush 7.0-dev using composer, I am having problem i.e  it doesn't by-default detect drupal installation when I am on sites sub-folder,

Drush running on sites-root directory,

drupal7/sites/example.com/modules/views$ drush status

 Drupal version                  :  7.30                               
 Site URI                        :  http://example.com              
 Database driver                 :  mysql                              
 Database hostname               :  localhost                          
 Database port                   :                                     
 Database username               :  example_user                    
 Database name                   :  example_db                     
 Database                        :  Connected                          
 Drupal bootstrap                :  Successful                         
 Drupal user                     :                                     
 Default theme                   :  bartik                             
 Administration theme            :  seven                              
 PHP executable                  :  /usr/bin/php                       
 PHP configuration               :  /etc/php5/cli/php.ini              
 PHP OS                          :  Linux                              
 Drush version                   :  7.0-dev                            
 Drush temp directory            :  /tmp                               
 Drush configuration             :                                     
 Drush alias files               :                                     
 Drupal root                     :  drupal7
 Site path                       :  sites/example.com               
 File directory path             :  sites/example.com/files         
 Temporary file directory path   :  /tmp                            


Drush running under sites-subdirectory,

drupal7/sites/example.com/modules/views$ drush status

 Drupal version         :  7.30                               
 PHP executable         :  /usr/bin/php                       
 PHP configuration      :  /etc/php5/cli/php.ini              
 PHP OS                 :  Linux                              
 Drush version          :  7.0-dev                            
 Drush temp directory   :  /tmp                               
 Drush configuration    :                                     
 Drush alias files      :                                     
 Drupal root            :  drupal7 


So, how do I configure Drush, is there anything I can do to make it work, I don't want to use --uri  or -l flag or any other options everytime.

Update

Also when I download modules it get downloaded on sites/all/modules directory

drupal7/sites/example.com/modules$ drush dl webform
Project webform (7.x-3.20) downloaded to drupal7/sites/all/modules/webform.                                     [success]


But if I am on sites-root directory it works fine,

drupal7/sites/example.com$ drush dl webform
Project webform (7.x-3.20) downloaded to /home/sysop/project/drupal7/htdocs/sites/heisenberg.com/modules/webform.                          [success]
You need to add an alias conf file named YOUR_SITE_NAME.aliases.drushrc.php in sites\all folder with that code.

// The site in sites/YOUR_SITE_NAME/ 
$aliases['YOUR_SITE_NAME.local'] = array(
  'uri' =&gt; 'YOUR_SITE_NAME_URI',
  'root' =&gt; '/path/to/drupal_root_folder',
  'path-aliases' =&gt; array(
    '%dump-dir' =&gt; '/tmp'
  ),
);


Then clear cache : drush cache-clear drush. 

Test your alias : @YOUR_SITE_NAME.local status.

To run a command, for the sake of example : @YOUR_SITE_NAME.local mb MODULE_NAME hook1 hook2 --write



UPDATE : in order to create automatically Drush site aliases for many sites, place this code in your aliases.drushrc.php file.  Drush will look for aliases.drushrc.php in the ".drush" folder in your home directory (see this post to get sure where to put this file).

$aliases = array();
$drupal = '/var/www/drupal';

// Automatic alias for each Drupal site
$site = new DirectoryIterator($drupal . '/sites');
while ($site-&gt;valid()) {
  // Look for directories containing a 'settings.php' file
  if ($site-&gt;isDir() &amp;&amp; !$site-&gt;isDot() &amp;&amp; !$site-&gt;isLink()) {
    if (file_exists($site-&gt;getPathname() . '/settings.php')) {
      // Add site alias
      $basename = $site-&gt;getBasename();
      $aliases[$basename] = array(
        'uri' =&gt; $basename,
        'root' =&gt; $drupal,
      );
    }
  }
  $site-&gt;next();
}

// Get all site aliases
$all = array();
foreach ($aliases as $name =&gt; $definition) {
  $all[] = '@' . $name;
}

// 'All' alias group
$aliases['all'] = array(
  'site-list' =&gt; $all,
);


You can also read this : create your own drush aliases. You could even think about managing synchronization between remote and local systems (source).

EDIT : as per ericx comment, consider adding bash-completion. Drush comes with a bash-completion file, drush.completion.sh, which offer alias completions.