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

Re: Bug related to single-quoting a String



> On 08 April 2020 at 11:39 Ronald Fischer <ynnor@xxxxx> wrote:
> What I want to report can be a bugh either in the documentaion
> (man-page) or in the implementation, depending on which one is correct.
> 
> I am running Zsh 5.5.1 for Cygwin (which seems to be the most recent one available for this platform).
> 
> In the man-page, it says in the chapter about single-quoting a string:
> 
>     A literal ' character can be included in the string by using the \' escape.
> 
> Taken this at face value, the following should work:
> 
>     echo 'a$b\'c'

I believe you're looking at the documentation for the $'...' style of quoting.  So you can do

echo $'a$b\'c'

This style allows a bit more interpolation than ordinary single quotes.

pws



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