There are so many neo-shells that go crazy with colors, autocompletions, & SQL-like features while the most basic problems (like handling of newlines/spaces/international chars) are mostly swept under the rug with -null/-print0, which is more hack than solution. I think Tom Duff's rc shell was an excellent start in that direction, which sadly went nowhere.
What is YSH? https://oils.pub/ysh.html
I am writing a quoting module now, but the key point is that it's a powerful enough language to do so. It is more like Python or JS; you don't have to resort to sed to parse and quote strings.
I posted the quote-argv solution above -- in YSH it will likely be:
But you can write such a function NOW if you like---
quote.sh follows the (subtle) idiom of replacing a single quote ' with
which means it works on systems with remote POSIX sh, not just YSH !e.g. "isn't" in POSIX shell is quoted as
which is these three word parts: YSH also has:- JSON, which can correctly round trip every Unicode string, without writing your own parsing functions
- JSON8, an optional extension that can round trip every byte string you get from the Unix kernel
https://oils.pub/release/latest/doc/j8-notation.html