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.



> 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