scanner/parser: add support for single quote strings
λ> echo 'hello world'
hello world
λ> echo "hello world"
hello world
Single quoted string must behave in the same way as double quoted string.
Make sense, nowadays this command will fail with single quote
[«08:39:24 ~»]λ> chmod '+x' c /bin/chmod: invalid mode: ‘'+x'’ Try '/bin/chmod --help' for more information. ERROR: exit status 1
I don't like it. I don't see any advantage on having two different ways to do the same thing. This only opens space to code that has " sometimes and ' on other times, and people arguing about how the code should be consistent, and them people documenting that in project X you should always use ", or ', for consistency sake.
But we need to solve exactly the problem @lborguetti is pointing out.
@katcipis What do you think of failing with a good error message in case of using single quotes?
$ chmod '+x' a.sh
error: Use double quotes instead of single.
# single quotes inside double works as expected
$ echo "'"
'
@tiago4orion Error message sounds good