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

Misc. "typeset" oddities



I used "typeset -U" in a function, and it had the effect of "local".  This
is pretty confusing.  I had to switch to "typeset -xU", which seems really
strange because you can't normally export arrays.

If a variable is set and then you attempt to add attributes to it with
"typeset", sometimes the value of the variable is cleared, and other times
it is not.  In particular, array variables MUST be set BEFORE you attempt
to use "typeset -U" on them; and string variables are cleared if you use
"typeset -L" or "typeset -R" on them.  There may be other such cases.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"




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