Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zpasesopts problem



On 2021-06-02 17:23, Roger Mason wrote:
2021-06-02 13:44:44 -0230, Roger Mason:

My guess would be that you're expecting $argv to be:

typeset -a argv=( --symbol Si --rmt 1.55 --nocc 7 --vstates 1112 )

but it's not, possibly because you've called "shift" too many
times or with the wrong number as argument.

It's not shift, it's another zparseopts instance which is affecting your
`$argv`.

# ngridk.  Needs special handling b/c it is an array.  For some reason
# I could not get text like '1 1 1' to load into postgresql correctly.
zparseopts -D -E -A intarrays  - -ngridk: -xctype:
zparseopts -D -E -A elkbools   - $elkbools
zparseopts -D -E -A elkfloats  - $elkfloats
zparseopts -D -E -A elkints    - $elkints
zparseopts -D -E -A elktexts   - $elktexts


Check these, it may be that one of the $elk*s contains the word `-symbol`
and thus your `--symbol` flag gets `-D`eleted here. Add this just before
these zparseopts calls:

    typeset -mp 'elk*s'




Messages sorted by: Reverse Date, Date, Thread, Author