summon icon indicating copy to clipboard operation
summon copied to clipboard

Make list of environment variable names available in child process

Open doodlesbykumbi opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe

If we strip both @SUMMONENVFILE and the proposed @SUMMONDOCKERARGSwe see that at the core they use the list of summon injected envvar names. If you know that the envvars that summon injected are A, B and C, then the rest can be done in bash or otherwise with relative ease.

This allows us to not build special cases into Summon. Instead we provide primitives to accommodate such cases and beyond.

Describe the solution you would like

Perhaps Summon injects a special environment variable called SUMMONVARNAMES or has a substitution variable similar to @SUMMONENVFILE called @SUMMONVARNAMES.

Describe alternatives you have considered

N/A

Additional context

N/A

doodlesbykumbi avatar Feb 02 '21 14:02 doodlesbykumbi

Maybe having a json output using a magic string (@SUMMONENVJSON or anything else) would do the trick. This output could be easily formatted with any external tool.

mcanevet avatar Feb 11 '21 07:02 mcanevet