Closed psprint closed 4 years ago
I've also pushed an unquoting of the special characters like $
, {
, }
, @
, (
, )
to allow them to have the special function in the passed code. I was doing a test:
evl @str-read-all $FD \; reply=\( "\${(@f)REPLY}" \)
and it revealed the need for such treating of the special characters.
The tests pass, so I'll merge the PR.
Or better not, other issues arose, I'll investigate them
Now there's no problem when the argument itself contains a double-quote, as it's automatically quoted by using the (q) flag. Before, when someone did e.g.:
Then the command that would have been executed would be:
which was pretty meaningless thing to do ̧– to add the extra double-quotes around the argument. Now, the command that'll be run will be:
And it'll work as expected – the eval will receive the arguments correctly separated.