From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9901 invoked by alias); 26 Jan 2016 18:28:13 -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: 37794 Received: (qmail 18852 invoked from network); 26 Jan 2016 18:28:09 -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=6vqEFjhAHL1UEd2QF3kMiD5K9VF59SfOEZn5U1A9APw=; b=U8UaacQaLsdttEbHLygHUj4wqL8EmXQt2Bh8qTP7TaxJsIp1XXfwMsclroNT8B5qql Rt6S99tvx8bDRNHRdD5fy/wOVlULPkBUtpsPc9kOMRyazpRcCXVkKvhBqn+/7G7Wknqy g2+iOZDUNuzv05eScVmxzKZli/5o54GqBCa6Sm0nYjbKegZVvqxPA9t7IPf4ov90pl0B h8XNiJ1kvcELUBugnJQUGLko+Pkp49Y81N51iexDBRs34XYInUUdUKQMKb2ylWI+B2Ip MCBDrH1MGVof+Ck8ywMDEwB5bR4JxylsBwTr+QMolZvFGKHy2vDoEZUmhquoqUakLhtK zKtw== 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=6vqEFjhAHL1UEd2QF3kMiD5K9VF59SfOEZn5U1A9APw=; b=XonyEto9L62/KZLnc7wR8MZ+N9sHe6r/JDqLUJ8TIipxmMtYiM6sPGY8tulND/PSwb kBkxgfITTFZxqQdbEr17WjOO1AWftb/QjV2QqwhG52d3q9cgUw0SlkIJkQwho7oGWonr ohUiRa3oFkKOE4p/d1QS9WBr1MP47gXpEIzPwpo++kr/EdNjm1ihibTSYPFDXERz+8Ly LR5iLZPTiktBHUjOqu7zFLf1gRFv4sitKGHVZs/h8DtAqGLSOwd2vB2raZi1096k9hGJ PsHjPyljzdBJJanOhtjdhsH0xZE63IJf6YkcR+izAwN2I03Yvapy6yBHX+btNAVr2AVS 6prQ== X-Gm-Message-State: AG10YOThs/TN0+kQ1UoH8CZbrAhcMGlt/SzVuzTvYI+aveSQrVQrjN85imCpvEKvm4qvZQ== X-Received: by 10.98.71.93 with SMTP id u90mr36090924pfa.165.1453832886183; Tue, 26 Jan 2016 10:28:06 -0800 (PST) From: Bart Schaefer Message-Id: <160126102847.ZM18281@torch.brasslantern.com> Date: Tue, 26 Jan 2016 10:28:47 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Advanced option parsing across zsh commands" (Jan 26, 10:20am) References: 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, 10:20am, Sebastian Gniazdowski wrote: } Subject: Advanced option parsing across zsh commands } } I like zparseopts because of -E option, which allows to mix options } with strings and handles --. Is it expected that one day zsh will do } the same? No, this is not expected. } % set -- a -b something -- -c } % typeset -A opts } % zparseopts -A opts -DE b: c } % echo "${(kv)opts}" } } % # $1, $2, ... $5 are still the same You can't stack the options of zparseopts itself, i.e, you can't use -DE, you have to use -D -E. zparseopts also doesn't handle "negated options" in the +X format, only those introduced with "-". There's a fairly convoluted issue with making "+" work for the associative array case because of the way zparseopts gathers up the arguments of each option before assigning to the array.