autoclave icon indicating copy to clipboard operation
autoclave copied to clipboard

Support environment variables as command line arguments

Open DRMacIver opened this issue 7 years ago • 3 comments

Often what I want to do is I run a command, find it's unreliable, and then run it again with autoclave.

It would be nice if I could do this by just pressing up and putting autoclave at the beginning of the line, but if the command I'm running is FOO=bar ./do-stuff I have to instead write FOO=bar autoclave ./do-stuff. It would be convenient if I could write this as autoclave FOO=bar ./do-stuff.

(I'm aware this is a very petty feature request. You should feel free to ignore it as too high a developer : user effort ratio)

DRMacIver avatar Aug 02 '18 13:08 DRMacIver

So other command line arguments that match the pattern something=something should call setenv before the run loop?

silentbicycle avatar Aug 02 '18 15:08 silentbicycle

So other command line arguments that match the pattern something=something should call setenv before the run loop?

Yup, exactly.

DRMacIver avatar Aug 02 '18 15:08 DRMacIver

That seems like a good idea. I occasionally rely on make doing something similar.

There shouldn't be any ambiguity between environment variable bindings and other command line options, and any other ambiguities (running a program with = in the name, I guess?) shouldn't be surprising. The implementation should be straightforward. I'll probably add it in the next version.

silentbicycle avatar Aug 02 '18 16:08 silentbicycle