Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug Report: Escaped backslash incorrectly reinterpreted as control escape in double-quoted strings



> On 26/11/2025 10:29 GMT Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> This is not a bug, but the default behavior of echo in zsh as
> documented.

Indeed, this is quite easy to see.

% echo "\`\\blog\\\`"
log\`

# With system echo
% /bin/echo "\`\\blog\\\`"
`\blog\`

# With raw print, suppressing interpretation of backslashes
% print -r -- "\`\\blog\\\`"
`\blog\`

On my Ubuntu system all the command line printf's I can lay my hands on
actually behave the same as zsh, including the external command and
those built into other shells.

cheers
pws




Messages sorted by: Reverse Date, Date, Thread, Author