3 ms·
The PATH should be a list of strings not a string where : means something special.
by ambrop7 10y ago
The PATH should be a list of strings not a string where : means something special.
- the_mitsuhiko 10y agoAnd then how do you escape it?
- zeveb 10y agoIn a sane system, PATH=/home/me/bin:/usr/local/bin:/usr/bin would be (setf bin-dirs '(#P"/home/me/bin/" #P"/usr/local/bin/" #P"/usr/bin/")) and if I wanted to have a quote in a file I could just write #P"/really-weird-name\"-isn't-it台北/bin/".
- geofft 10y agoTransmit it as a JSON list or whatever. We're already assuming we're breaking UNIX userspace compatibility, so any option for reliably transmitting lists of strings is fine, and we have lots of those.
- ambrop7 10y agoBy list I mean an abstract data structure, you don't "escape" it. You could encode it in a specific format like JSON, if you want.
- yrro 10y agoNUL