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

Re: More rabbit-holes with unset variables

2020-11-24 23:02:05 -0800, Bart Schaefer:
> I was experimenting with ksh to look deeper into adding behavior to
> ksh_typeset in zsh, and discovered that this example:

Sorry I didn't read the full discussion as I just subscribed to
the list, but I did have a look at the differences between local
scope implementations at some point and there are many many
variations between shells.

I did find zsh was far from being the worst one there.

They have been discussed at length on the austin group (POSIX)
mailing list as they've been trying on and off to specify a
local scope for sh variables.

I did write a quick summary of some of those findings at:
which is very relevant to this discussion.

See https://www.austingroupbugs.net/bug_view_page.php?bug_id=767
for the POSIX attempt. You'll find a number of lengthy related
discussions on their mailing archive.

It's after one of those discussions that bash added the
localvar_inherit and localvar_unset options, and NetBSD sh added
-I and -N options to "local" I beleive (the mantainers of bash,
NetBSD sh, bosh are regulars on the austin group mailing list,
FreeBSD sh maintainer is seen occasionally).


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