Stephane Chazelas <[email protected]> wrote:
 |2017-05-17 13:49:18 +0200, Steffen Nurpmeso:
 |[...]
 |>   vpospar set x 'a \ b' "foo'" "\\'b\\a\\r\\" AƤ
 |>   echo "$#: <${1}><${2}><${3}><$4><$5>"
 |>   vput vpospar x quote; eval vpospar set ${x}
 |>   echo $#: <${1}><${2}><${3}><$4><$5>
 |[...]
 |
 |Your problem here is with your usage of echo. You can't use echo
 |for arbitrary data, especially data containing backslash
 |characters. In Unix-compliant echos, echo '\r\a' is required to
 |output a CR and BEL character, while for POSIX the behaviour is
 |unspecified. bash's echo doesn't expand those by default unless
 |called in some specific environment like:

Eh, this is just a try to make something work that uses rules
which are lesser sophisticated than the shell is, and which cannot
(yet) offer simple variable assignments which (at least
potentially) involve macros/functions or even subprocesses, as in
x=`quote bla`.  It is a bit of a crux.  But getting better.
(Never supporting redirection i thought, as can be seen above,
though, never being a real shell.  But a bit.)
Ciao.

--steffen
|
|Ralph says i must not use signatures which spread the light!

Reply via email to