From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11545 invoked by alias); 27 Jan 2016 07:06:47 -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: 37811 Received: (qmail 8520 invoked from network); 27 Jan 2016 07:06:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=ARvoEWiNI37/pupy/uahFhy7HSkK2+ZUpnPi3L9cRFA=; b=nQelGK3BYEFSojlNI3WUvzJUxmjdHZt2w+23fTEQHz5lNCCab3qkzGdAJvcRn9QZyN LHWPRyvAL/ztYg1y35AFmLJuLE6QLfRSloqAUUzFkT1CNcQNMOO5XAGOd2gNllfvpjDy YBgoBqgyaHSXfJa5RoY/s7FbI6jYTefMBkYXRSY1LQvkhQWpVF6fbtsM88fGCWiQmoS3 1KmEx5ToF/JbSc11XXrUahT5kZ5WMFDqes3JtgddYKAOhxmKv+Kpjn0qYKUzLDAqgMmH XSEtHtHENrIqbHDjIXFVYaXLviRl3UbDQnLw2a8OttpMpTWRShLkSZLnOqsIRt5MgyZ7 AT8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=ARvoEWiNI37/pupy/uahFhy7HSkK2+ZUpnPi3L9cRFA=; b=LyHKttVNodWhL/ZcJDfGqdXyzZKJmnjQUaRcMOy75N9VmmHoU4SRJWoa2Pbz3E1iYa dopupGZoRA8vImJxPMYP19P0/k2y4msA1h7OoZE1dxvRFUtEWyVH3CebgDn5FTm3nngJ gG7wupVv8RwmjgqnKClnPqGxYLZ9I7RE7D8Yqe5bK1YUpmEAYYbXvhGoI57YPXsSAsgb 9ONItsHabOfwp3xjDr0vpjtEty2fnNI1tpITCxgc4Bf9CIJ6MG1RK6aRR7QyiShn1SaH aypBqd3Wj1i6kEHqQHHzVmmvUh7CApzf51PZMkVGgv18rGwzZPOLW3njaLj5+0MeZMEC uI+w== X-Gm-Message-State: AG10YOTHNOD/mYVn2ebh8qCQT9ChwEK2/IIEcmEao1jK1998KPgybt+rEV/+wMmi4l3+7A== X-Received: by 10.98.16.85 with SMTP id y82mr6033478pfi.90.1453878404271; Tue, 26 Jan 2016 23:06:44 -0800 (PST) From: Bart Schaefer Message-Id: <160126230727.ZM3686@torch.brasslantern.com> Date: Tue, 26 Jan 2016 23:07:27 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Advanced option parsing across zsh commands" (Jan 26, 8:09pm) References: <160126102847.ZM18281@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: Advanced option parsing across zsh commands MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 26, 8:09pm, Sebastian Gniazdowski wrote: } } Here is how it works if order of option specification is changed: } } % zparseopts -a optsa -A opts -D -E +: b: c All you've done there is manage to get the empty-string option to be tested after any of the others (the specs are tested against $argv in reverse of the order they appear as zparseopts arguments). It's almost certainly coincidental that this created options that seem to be named "-" and assigned "+X" as the value; this effect no longer occurs with my patch from 37810, and is probably not reliable with any zsh prior to that patch.