From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 29767 invoked from network); 8 Apr 2020 10:40:43 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 8 Apr 2020 10:40:43 -0000 Received: (qmail 15751 invoked by alias); 8 Apr 2020 10:40:27 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45662 Received: (qmail 16332 invoked by uid 1010); 8 Apr 2020 10:40:27 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25772. spamassassin: 3.4.4. Clear:RC:0(66.111.4.25):SA:0(-2.7/5.0):. Processed in 0.746889 secs); 08 Apr 2020 10:40:27 -0000 X-Envelope-From: ynnor@mm.st X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.25 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtredtre ertdenucfhrhhomhepfdftohhnrghlugcuhfhishgthhgvrhdfuceohihnnhhorhesmhhm rdhstheqnecuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephihnnhhorhesmhhm rdhsth X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-1104-g203475c-fmstable-20200408v2 Mime-Version: 1.0 Message-Id: Date: Wed, 08 Apr 2020 12:39:32 +0200 From: "Ronald Fischer" To: zsh-workers@zsh.org Subject: Bug related to single-quoting a String Content-Type: text/plain 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' However, if I enter this in an interactive shell, Zsh reminds me that a closing single quote would be missing. The behaviour is as if \' can **not** be used to place a single quote inside a string surrounded by single quotes. Incidentally, this behaviour is consistent with bash and dash, and the bash man-page says explicitly, that \' is not an escape inside a single-quoted string. Hence, the implementation of zsh mimics in this respect to what bash and POSIX shell are doing. I don't know, whether zsh was intended to behave in this way; if it is the case, the documentation is faulty. If the man page is considered right, the implementation is buggy. (Crossposting note: I have discussed this issue at https://stackoverflow.com/questions/61095565/having-a-single-quote-inside-a-single-quoted-string?noredirect=1#comment108090871_61095565 - just in case you want to read the comments posted there, or also add something to that thread). Ronald Fischer