Closed (fixed)
Project:
Drush
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Jul 2010 at 00:14 UTC
Updated:
17 Sep 2010 at 12:20 UTC
Jump to comment: Most recent file
Often, a project has but one module, and its module has the same name as the project. In instances when this is not the case, though, it can cause confusion (e.g. #862460: pm-enable command not working?).
Much of this confusion could be avoided if drush dl would print out a confirmation message that contained the module names. For example:
The project google_analytics contains 1 module(s): googleanalytics
This message could appear after the existing "downloaded to" message, and could be suppressed in the canonical case (that is, when the module name matches the project name).
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 866716-dl-modules.patch | 2.05 KB | greg.1.anderson |
Comments
Comment #1
greg.1.anderson commentedHere it is. An example below: a project with one module with the same name as the project, a project with one module with a different name than the project
(n.b. I removed "[success]" tags from the above log for readability.)
The log message uses $project['project_type'] to determine the type of project being downloaded, so it will say "theme" instead of "module" if appropriate.
Comment #2
moshe weitzman commentedPerhaps a --pipe should be added so a script can parse the output of this? Just a thought.
Comment #3
greg.1.anderson commentedFor scripts, I think I'd rather have a separate pm-modules command. With pm-download, there's both the download location and the module list to worry about. How would that be formatted? Maybe like this:
There's a bit of a parsing problem, esp. if there are multiple projects being downloaded.
Comment #4
moshe weitzman commentedMakes sense. Feel free to commit this when you are ready.
Comment #5
moshe weitzman commentedHmm. Is download location really needed? Couldn't one just pass the list of modules to pm-enable and let it do its thing?
Comment #6
greg.1.anderson commentedI guess that the download location isn't necessary, because you can always use dd to get that later. I'll add --pipe as you suggested above. If you want, I could also add
drush dl --enable google_analyticsto download + enable a module...Comment #7
greg.1.anderson commentedCommitted with --pipe but without --enable. Also committed #870852: drush --pipe should print nothing rather than "Array ()" when there is no output so that
drush pm-enable `drush pm-download --pipe modulename`will work right in the error case.Comment #8
greg.1.anderson commentedThis could go in 3.x too.
Comment #9
anarcat commentedWe have discussed the policy of the drush 3.x branch at a BOF at Drupalcon CPH and it was agreed to only include critical and security fixes on the branch, to make it easier to sync in the official distributions (e.g. Debian). New features and small bug reports like this one, unless really critical or security, will therefore be refused for the 3.x branch.