jigarius / drall

A tool to run drush commands on multi-site Drupal installations.
GNU General Public License v3.0
33 stars 5 forks source link

Allow running commands on specific sites #3

Closed jigarius closed 1 year ago

jigarius commented 2 years ago

Allow the user to run commands on a list of sites. Say, there are 4 sites, but I want to run the command only on abc.com and def.com.

Possible syntaxes

# This one has a safe namespace and takes multiple sites at once.
drall --drall-uris="abc.com def.com"
# Similarly, we can have something for aliases.
drall --drall-sites="@abc @def" st
jigarius commented 1 year ago

After doing some research, I believe using a --filter option would be the best solution. Got this idea from Drush.

drush pm:list --filter=foo

Next steps

jigarius commented 1 year ago

I did some research and found the library consolidation/filter-via-dot-access-data which is responsible for the filtering in drush pm:list. It didn't take long to implement a similar filter in all the commands, i.e. sa, sd, ex.