From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21156 invoked by alias); 24 Feb 2018 19:42:09 -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: 42399 Received: (qmail 6641 invoked by uid 1010); 24 Feb 2018 19:42:09 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-4.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.0.253.68):SA:0(-1.9/5.0):. Processed in 7.91128 secs); 24 Feb 2018 19:42:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [86.21.219.59] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.3 cv=BpyzP7f5 c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=NLZqzBF-AAAA:8 a=aAglA56HDvVjT5a0Q-oA:9 a=CjuIK1q_8ugA:10 a=wW_WBVUImv98JQXhvVPZ:22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1519501316; bh=TM+/zTqiMR7fyW/ykEQfrTg5w3nKcKRdGvuawHSZGG8=; h=Date:From:To:Subject:In-Reply-To:References; b=ahJ85yk6mziIZNK19KLppQBi3bvPFpOY9yIJf31k9g6OzDb8LZXk2xNY3y/PiCEaR wCyU75iHGiZFFN0VGbG7oQmTPTNOKiHjd+4YIMUrV7nHxXteWVkAH3uEfzX6WI8ha8 7OFLbNqHheCtKFNH90thHMNOdg4+/bF1iSrfPMX8kAbuR/RB2Q376Xefa1/FS2TpCh ud7C47oh/i/k5XHD0ZUr7wbOPLefpuGtTtv4Ig7Ow+PUmQQWRb+X56L32CqwY65Kfy 8xVuOXZ05yCDUJbEUvXzfPJTtaA8srpCRJKIIrS6Aywcro+b2NRmJ1WtEIrIHaE+eu jDEoY2LSrkCIQ== Date: Sat, 24 Feb 2018 19:41:56 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: [BUG]builtin echo error doing arguments parsing Message-ID: <20180224194156.5359fca0@ntlworld.com> In-Reply-To: <7D6C22CC-926D-4AD3-ACF9-3F5E55F7380F@ntlworld.com> References: <20180222093711.0777e602@pwslap01u.europe.root.pri> <20180222103201.314c839b@pwslap01u.europe.root.pri> <20180222172601.2b7cb68b@pwslap01u.europe.root.pri> <20180222193423.16d0bf46@ntlworld.com> <20180224082040.GA5121@chaz.gmail.com> <7D6C22CC-926D-4AD3-ACF9-3F5E55F7380F@ntlworld.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfGOLoxaC8uM+iPoCjJ12dTNE3WYijeXhnXPEo+CFhEDimuVXhpTRGibuuZq+CDMgSH6jEzeC7dwjKl9Kr0GE8QjPo6x3JOnRR4VWFgzWgepLd1S3HEhK ID8cS9qpyeqxdKcVMOJ6dkokXtXZv1ubdnPx9B74mnghELG2xaGx4LBTAuY7C9AUcDpuPzNj9ASwYw== On Sat, 24 Feb 2018 09:51:51 +0000 Peter Stephenson wrote: > Perhaps the difference could be flagged up better in the do. (or "doc" as we say, if we're not sending replies from our mobile phones.) I'm sure somebody can object to aspects of the following. pws diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 6c7ec4b..9014c78 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -504,6 +504,15 @@ pindex(BSD_ECHO, use of) The tt(-E) flag, or the tt(BSD_ECHO) option, can be used to disable these escape sequences. In the latter case, tt(-e) flag can be used to enable them. + +Note that for standards compliance a double dash does not terminate +option processing; instead, it is printed directly. However, a +single dash does terminate option processing, so the first dash, +possibly following options, is not printed, but everything following it +is printed as an argument. The single dash behaviour is different +from other shells. For a more portable way of printing text, see +tt(printf), and for a more controllable way of printing text within zsh, +see tt(print). ) module(echotc)(zsh/termcap) module(echoti)(zsh/terminfo)