From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22970 invoked by alias); 30 Sep 2017 19:51:08 -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: X-Seq: 41798 Received: (qmail 26981 invoked by uid 1010); 30 Sep 2017 19:51:08 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-10.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.74):SA:0(-4.7/5.0):. Processed in 1.151748 secs); 30 Sep 2017 19:51:08 -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=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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.1 cv=SeoKDalu c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=q2GGsy2AAAAA:8 a=bm0eo8kTilS8aUTdBXUA:9 a=CjuIK1q_8ugA:10 a=z9dJwno5l634igLiVhy-:22 Date: Sat, 30 Sep 2017 13:48:51 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: PATCH: typeset -P Message-ID: <20170930134851.503623ed@ntlworld.com> In-Reply-To: <170929155533.ZM15802@torch.brasslantern.com> References: <20170929205059.5fa7eb4d@ntlworld.com> <170929155533.ZM15802@torch.brasslantern.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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1506775732; bh=mLCdmT9NgN5LeB85p09S/wUWX/yhzGgpR1jIDG7lTI4=; h=Date:From:To:Subject:In-Reply-To:References; b=6COVDds0xBmVVi509B5xzo7rO3HFHnB05kFbxrasUKEikU0RCQSCLPdIusZlRC75e BEbbGfM2Hm8f6hVCcl6f4VJo69gS4yuZPHgiYZj7e411C8TW5m1XOPUX4zVwzFH0os +L2wADlMtjDe7Q6McLQSymLJ+4woOcG5DtAPEuGVGxFCJbJsaLFbpbEyzrqT9dSGzQ V/2g/G9mIVIioEXDlSpZAnhQWrYmReROWglf1WSjaZhZcm6zdMykfszTyln9uVd7lN rNYKbqhNsTuSYwMYtr5Q+L40j8zTEELrbEczTs+ZpCxdCSeWPy/X4UFpk/KcrSCp2e ePcwl2Z/+CnQw== On Fri, 29 Sep 2017 15:55:33 -0700 Bart Schaefer wrote: > I'm ambivalent about this choice of option letter, though. What about > something entirely unlikely to conflict, like -1 (ala "ls -1")? Then > e.g. one could use the idiom "typeset -p1" to make it obvious. Handling integer options is difficult as the option parser has special arrangements. Optional integer arguments are possible, so we could enforce this as -p1, i.e. your idiom becomes the required syntax. I think I've got this working; I'll send it later with documentation and tests. pws