machinery
machinery copied to clipboard
Minimise environmental impact of `env`
The command env creates a number of environment variables, while most of the time, the only interesting ones are those ending with _IP, i.e. the ones containing the IP addresses of the created machines. Recognising an option called -full or similar to keep the current behaviour and modify the behaviour of env so that it only returns (and thus exports) the interesting IP addresses is probably a good move.
There is now one extra variable created, ending with _HOSTNAME, so implementing this feature is getting even more pressing. Perhaps a -filter option to env could be relevant, but that wouldn't cover the cases when variables are substituted in compose files.