termux / proot-distro

An utility for managing installations of the Linux distributions in Termux.
GNU General Public License v3.0
1.8k stars 208 forks source link

[Feature]: argument `--env` to set environment variable #410

Closed knyipab closed 5 months ago

knyipab commented 5 months ago

Feature description

Continue the discussion of wrapping command (first mentioned in #409 ). There is currently no way to set environment variables for command such as R_HOME for proot-distro login ubuntu --work-dir="$PWD" -- R "$@".

You know, many programs uses environment variables as input. It looks good if we can use --env

I do see the need of --env, just like -e in docker run. Termux users nowadays perhaps use proot-distro just like docker becuz the latter is not available.

By the way, I am well aware of alternative like eval or bash << docstring but escaping all $@ seems horrible.

sylirre commented 5 months ago

Available in next version

knyipab commented 5 months ago

Thanks!