From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5095 invoked by alias); 4 Feb 2015 17:10:39 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19808 Received: (qmail 27414 invoked from network); 4 Feb 2015 17:10:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Ko/6AtSI c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=0HtSIViG9nkA:10 a=m93uzirOxYdK9Q_xPw0A:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <150204091014.ZM3216@torch.brasslantern.com> Date: Wed, 04 Feb 2015 09:10:14 -0800 In-reply-to: <54D195B2.4070205@gmx.com> Comments: In reply to Eric Cook "Re: ${var:1:1:=y}" (Feb 3, 10:44pm) References: <54D155C8.4080600@eastlink.ca> <412544FB-49A2-43AA-BC76-DC1AF1AA71BE@larryv.me> <54D16A4C.9010609@eastlink.ca> <150203192508.ZM2159@torch.brasslantern.com> <54D195B2.4070205@gmx.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: The "-" and "--" options (was Re: ${var:1:1:=y}) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 3, 10:44pm, Eric Cook wrote: } Subject: Re: ${var:1:1:=y} } } On 02/03/2015 10:25 PM, Bart Schaefer wrote: } > All builtin commands other than precommand modifiers, even those that } > have no options, can be given the argument `--' to terminate option } > processing. [...] For historical reasons, } > most builtin commands also recognize a single `-' in a separate word } printf , test/[, set -A and maybe a few others are exceptions to those } rules. Also "echo" does NOT accept "--" in this way, it ONLY acceps a solitary "-". I forget why that is. printf : accepts -- but not - test : accepts neither set : the -A itself ends option processing, and "--" has added semantics