Open Amund opened 2 years ago
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
${env.PROJECT_SSH_USER}
PROJECT_SSH_USER
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
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 byPROJECT_SSH_USER
environment value, as described in https://www.drush.org/latest/site-aliases/#environment-variablesThere 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.