Drush 5 and up:
Newer versions of Drush (version 5 and higher) will ask you if you want to download the required dependencies when you enable (drush en
) a module. It will also ask if you want to download the module itself if you didn't download it yet. Combined with the "-y" option (e.g. drush en views -y
), everything will be downloaded and enabled automatically without asking further questions.
Note that the automatic downloading of dependencies may fail if the required module's name is not the same as its project name on drupal.org. For more info, see the my original answer for Drush 4 below.
Original answer (Drush 4):
No, there is no way to do that. The problem is that there is a difference between a module and a project. Often (but not always) the name of the project is identical to the module (or one of the modules) contained in the project. A single project (eg. Views) can contain multiple modules (views, views_ui, views_export). While drush dl
downloads a project, drush en
enables a module.
When a module declares dependencies, it declares dependencies on modules, not projects. When performing a drush en
, Drush can check if the required module is available. However if it's not available, Drush has no way of knowing which project to download. For Drush to be able to automatically download required projects, work needs to be done in the underlying projects/modules infrastructure, so Drush can retrieve a mapping of projects and modules. See also Smarter handling of missing dependencies.
drush en -y
will automatically download and enable dependencies.