From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 17516 invoked from network); 28 Apr 2020 09:38:49 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 28 Apr 2020 09:38:49 -0000 Received: (qmail 16777 invoked by alias); 28 Apr 2020 09:38:37 -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: 45734 Received: (qmail 6450 invoked by uid 1010); 28 Apr 2020 09:38:37 -0000 X-Qmail-Scanner-Diagnostics: from forward501o.mail.yandex.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25793. spamassassin: 3.4.4. Clear:RC:0(37.140.190.203):SA:0(-2.7/5.0):. Processed in 3.230381 secs); 28 Apr 2020 09:38:37 -0000 X-Envelope-From: oxiedi@yandex.ru X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf-ipv4.yandex.ru designates 37.140.190.203 as permitted sender) Authentication-Results: mxback23g.mail.yandex.net; dkim=pass header.i=@yandex.ru From: oxiedi@yandex.ru Envelope-From: oxiedi@yandex.ru To: Daniel Shahaf Cc: zsh-workers@zsh.org In-Reply-To: <20200427193040.7484-2-danielsh@tarpaulin.shahaf.local2> References: <20200427193040.7484-1-danielsh@tarpaulin.shahaf.local2> <20200427193040.7484-2-danielsh@tarpaulin.shahaf.local2> Subject: Re:[PATCH 2/2] _arguments: Add the -0 flag, which makes $opt_args be populated sanely. MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 28 Apr 2020 14:37:48 +0500 Message-Id: <1314911588066668@iva8-5e86d95f65ab.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 > With this, «local -a values=( ${(0)opt_args[--foo]} )» would get the > value or values of the --foo option, as typed on the command line. > Without this, the completion function would have to reverse the "escape > colons and backslashes and join with colons" operation, and I don't know > of an easy way to do that. I've used local -a values IFS=: read -A values <<<$opt_args[--foo] once. Does it have some drawbacks?