3 ms·
I think having both is a good idea. Sometimes maybe you get your list of path names from a Here-document, for example.
by e12e 6y ago
I think having both is a good idea. Sometimes maybe you get your list of path names from a Here-document, for example.
- l0b0 6y agoFor sure we need both human- and machine-readable stream formats, but I don't really see how QSN has any advantage in that space over `printf '%q\n'` and NUL-terminated strings, respectively.
- chubot 6y agoI actually considered that, but it doesn't work. https://github.com/oilshell/oil/wiki/Shell-Almost-Has-a-JSON-Analogue https://github.com/oilshell/oil/wiki/Shell-Almost-Has-a-JSON... Single quoted strings in shell can't represent arbitrary strings either. And the %q format is actually different from the format ${x@Q} emits. QSN is a well-specified format.