honcho icon indicating copy to clipboard operation
honcho copied to clipboard

environ: Support variable names containing dots

Open mschmitzer opened this issue 2 years ago • 0 comments

This is useful for transporting arbitrary settings to applications. It is difficult to implement because shell variable names apparently may not contain dots, but environment variables may. Solving this by parsing the variable name with shlex and re-joining the tokens would swallow white space and thus turn "FOO BAR=baz" into a valid assignment. So use everything up to the assignment operator verbatim as the variable name and only shlex the value.

Environment variables containing dots are handled fine by e.g. the env command and the subprocess module.

mschmitzer avatar Jun 28 '23 07:06 mschmitzer