Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This comes up once in a while, would make a good alias example:
$options['shell-aliases']['dis-all'] = '!drush -y dis $(drush pml --status=enabled --pipe)';
Comments
Comment #1
Senpai CreditAttribution: Senpai commentedI like it! Tested "drush -y dis $(drush pml --status=enabled --pipe --no-core)" on a localhost copy of the @useCOD distro just now during the L.A. Drupal #COD code sprint, and it works like a charm!
I'll RTBC this idea, even though I'm hesitant to offer it as an inclusion in Drush 5 without some sort of flag that backs up the names of all the currently enabled modules to a text file.
Comment #2
Senpai CreditAttribution: Senpai commentedComment #3
Senpai CreditAttribution: Senpai commentedMentioned by @msonnabaum in IRC just now: "It probably should also have a --type=module flag in there too. No sense disabling all of the themes..."
So, the final example presented for inclusion would look like this:
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedI think that is extremely edge case, to the point of not meriting inclusion in core drush. Especially since there is no good way to recover (I don't want to add a way either).
Comment #5
msonnabaum CreditAttribution: msonnabaum commentedIt's too edge case to be commented out in examples/example.drushrc.php? Isn't this part of the recommended upgrade process?
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedyeah, it is part of the major version upgrade process. Unless you use site-upgrade which does this for you (and keeps track).
this gets used by a tiny fraction of sites and only once in their lifetime (what site upgrades more than once?)
anyway, if other committers want it then sure, go ahead.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedCommitted