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

Re: Weird error: opts[(r)-e]: parameter not set



On Sat, Oct 29, 2016, at 10:03 AM, Bart Schaefer wrote:
> torch% () { setopt localoptions nounset; local -a foo; print $foo[3] }
> (anon): foo[3]: parameter not set
> 
> The NO_UNSET option complains not just when the array itself is not
> declared, but whenever there is a dereference of an array element
> that does not exist.

I must have done something wrong when testing this, probably had "-e" in
the test array. Thanks, with Daniel's fix, the problem should be solved.

-- 
  Sebastian Gniazdowski
  psprint@xxxxxxxxxxxx



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