Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exported unset variables [was: 'export -p' lacks POSIX output]
On Sat, 29 Oct 2016 11:09:04 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> That one potentially gets rather ugly; consider:
>
> % setopt POSIXBUILTINS
> % export var
> % var=()
> zsh: var: attempt to assign array value to non-array
>
> Is that OK with everyone?
We've generally taken the attitude that POSIX copmliance settings aren't
intended to be useful to native zsh users, just compatible for everyone
else, so what it used to do isn't a big issue. I think this fits in
that category.
I don't think exporting arrays would be that hard, but if you want to do
it, the right way is probably to use "typeset -T" and specify which
character you want the elements to be joined with.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author