Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mapfile and unset: Does this actually work?
- X-seq: zsh-workers 52514
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: mapfile and unset: Does this actually work?
- Date: Sat, 3 Feb 2024 20:24:36 -0800
- Archived-at: <https://zsh.org/workers/52514>
- In-reply-to: <CAH+w=7ZQfwdNLPS1=Z4mWpV--Uedft3M-gSwD3Qn-3PxfK3O_A@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7ZQfwdNLPS1=Z4mWpV--Uedft3M-gSwD3Qn-3PxfK3O_A@mail.gmail.com>
If we're contemplating a release, does anyone else want to eyeball this?
On Sun, Jan 21, 2024 at 6:05 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> Doc says:
>
> mapfile
> This associative array takes as keys the names of files; the
> resulting value is the content of the file. The value is treated
> identically to any other text coming from a parameter. The value
> may also be assigned to, in which case the file in question is
> written (whether or not it originally existed); or an element may
> be unset, which will delete the file in question.
>
> However:
>
> % touch removable
> % zmodload zsh/mapfile
> % : $mapfile[removable] ; unset 'mapfile[removable]'
> % ls -l removable
> -rw-rw-r-- 1 schaefer schaefer 0 Jan 21 17:17 removable
>
> I tried several variations of this and I can't get mapfile to remove anything.
I still haven't worked out what's going on here.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author