Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
env arrays (was: Re: path PATH)
On Sat, 21 Jan 2023 12:19:51 -0800, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> The
> reason for this tied behavior is so that the scalar parts CAN be
> exported, because the environment cannot contain arrays.
It might not be able to contain arrays, but it's possible to have it
contain array *elements*--
% env 'blaat[0]=scaahp' 'blaat[1]=mekker' env | tail -n 2
blaat[0]=scaahp
blaat[1]=mekker
%
Can zsh work w/ such an approach? By default megets--
% setopt KSH_ARRAYS
% blaat[0]=scaahp
% export 'blaat[0]'
% env
[...no 'blaat[0]' in there...]
% 'blaat[0]'=scaahp
zsh: command not found: blaat[0]=scaahp
% export 'blaat[0]'=scaahp
% env
[...no 'blaat[0]' in there either...]
--zeurkous.
--
Friggin' Machines!
Messages sorted by:
Reverse Date,
Date,
Thread,
Author