mise icon indicating copy to clipboard operation
mise copied to clipboard

`env._.run`

Open jdx opened this issue 1 year ago • 5 comments

similar to #1447, it should be possible to execute arbitrary scripts which "export" env vars like this:

[env]
_.run = "./myscript"

Where unlike in #1447, this would be run like any other binary. Somehow it needs to pull env vars out of it, I know that direnv has a trick where they launch direnv inside of this script and that is able to pull the env vars out. We'll need something like that to make this possible.

jdx avatar Jan 13 '24 00:01 jdx

could the arbitrary script execute anything? I would like, for example, to automatically docker compose up when I enter some projects' dir

this could replace (my use of) direnv

malteo avatar Feb 13 '24 09:02 malteo

Would love to use this to load env vars from 1Password

zshannon avatar Feb 19 '24 06:02 zshannon

Would be lovely for scripts execution, but for single commands as well, to have atomic commands too :pray:

laluka avatar Mar 31 '24 20:03 laluka

Are there any plans to do this?

Ernest0-Production avatar May 06 '24 15:05 Ernest0-Production

You're welcome to take it on

jdx avatar May 06 '24 15:05 jdx