ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Add usage of environment variables in aliases

Open Amund opened this issue 3 years ago • 2 comments

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.

Amund avatar May 17 '22 21:05 Amund

Sounds great! Would love to see a pull request for this. We can follow Drush's implementation.

danielbachhuber avatar Sep 11 '22 18:09 danielbachhuber

Related https://github.com/wp-cli/wp-cli/issues/5566

danielbachhuber avatar Jan 19 '23 13:01 danielbachhuber