When I read in raw mode in bash:
read -r v
now typing 5 characters (quote, backslash, backslash, x, quote):
"\\x"
and I do a
echo $v
it displays
"\\x"
This is what I expect: Because of the -r switch, I get back what I had put in. When I do exactly the same in zsh, echo $v would display
"\x"
instead. From the manpage zshbuiltins:
-r : Raw mode: a `\' at the end of a line does not signify line continuation and backslashes in the line don't quote the following character and are not removed.
So zsh should behave the same, doesn't it? What is eating my backslash here?