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

Re: [BUG] Can't mark unset variables as read-only

Peter Stephenson schreef op 29-04-15 om 12:36:
> As you can imagine,
> something like this that completely breaks the normal programming model
> of variables (a variable can't have state if it's unset because it
> doesn't exist) is a nightmare to implement;

FWIW, I imagine a simpler way might be, rather than implementing
read-only as an attribute of variables themselves, to keep a separate
table of variable names marked as read-only which is checked against
upon variable assignment.

I know absolutely nothing about the zsh codebase, so feel free to laugh
at my suggestion. My interest is in getting the most out of
cross-platform shell programming, and I'm really only here to report a bug.

Many thanks for the patch. I'll apply it, test it, and report back.

(Also, my apologies for the initial duplicate. I thought it hadn't gone
through the first time.)

- Martijn

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