ideas
ideas copied to clipboard
Add usage of environment variables in aliases
- [x] Yes, I reviewed the contribution guidelines.
Since Drush 9, we can use environment variables in aliases definitions, which is a great feature to centralize datas in .env file.
In short, ${env.PROJECT_SSH_USER} is replaced by PROJECT_SSH_USER environment value, as described in https://www.drush.org/latest/site-aliases/#environment-variables
There are other related features (eg. env-vars), but I think this interpolation could be a nice addition to wp-cli aliases in a first place.
Sounds great! Would love to see a pull request for this. We can follow Drush's implementation.
Related https://github.com/wp-cli/wp-cli/issues/5566