Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re:[PATCH 2/2] _arguments: Add the -0 flag, which makes $opt_args be populated sanely.
- X-seq: zsh-workers 45734
- From: oxiedi@xxxxxxxxx
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re:[PATCH 2/2] _arguments: Add the -0 flag, which makes $opt_args be populated sanely.
- Date: Tue, 28 Apr 2020 14:37:48 +0500
- Authentication-results: mxback23g.mail.yandex.net; dkim=pass header.i=@yandex.ru
- Cc: zsh-workers@xxxxxxx
- Envelope-from: oxiedi@xxxxxxxxx
- In-reply-to: <20200427193040.7484-2-danielsh@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20200427193040.7484-1-danielsh@tarpaulin.shahaf.local2> <20200427193040.7484-2-danielsh@tarpaulin.shahaf.local2>
> 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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author