[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: access exported var
From: |
Kerin Millar |
Subject: |
Re: access exported var |
Date: |
Mon, 16 Jan 2023 06:36:42 +0000 |
On Mon, 16 Jan 2023 01:28:16 -0500
Lawrence Velázquez <vq@larryv.me> wrote:
> On Mon, Jan 16, 2023, at 1:05 AM, Kerin Millar wrote:
> > On Sun, 15 Jan 2023 23:59:54 -0600
> > Peng Yu <pengyu.ut@gmail.com> wrote:
> >
> >> But `echo "$Z"` print "a". Why bash can not treat exporting array as
> >> exporting the first element?
> >
> > Technically, that would be possible.
>
> For what it's worth, ksh exports indexed arrays that way, while zsh
> behaves like bash (i.e., does not export), and yash synthesizes a
> PATH-style scalar. (Of course, dash and POSIXly-correct yash don't
> support arrays.)
Thanks. I never noticed that ksh did so. I would say that yash goes overboard
there.
--
Kerin Millar
- access exported var, Peng Yu, 2023/01/16
- Re: access exported var, Kerin Millar, 2023/01/16
- Re: access exported var, Chet Ramey, 2023/01/16
- Re: access exported var, Peng Yu, 2023/01/16
- Re: access exported var, Chet Ramey, 2023/01/16
- Re: access exported var, Peng Yu, 2023/01/16
- Re: access exported var, Leonid Isaev, 2023/01/16
- Re: access exported var, Peng Yu, 2023/01/16
- Re: access exported var, Lawrence Velázquez, 2023/01/16
- Re: access exported var, Peng Yu, 2023/01/16
- Re: access exported var, Peng Yu, 2023/01/16
- Re: access exported var, Lawrence Velázquez, 2023/01/16