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

Re: PATCH: zsh-3.1.5-pws-5 + recent: typeset -T MYPATH mypath (finally!)



On Jan 28,  6:25pm, Peter Stephenson wrote:
} Subject: PATCH: zsh-3.1.5-pws-5 + recent: typeset -T MYPATH mypath (finall
}
} Now I've tidied up bin_typeset() a bit, it's finally possible to make
} user-tiable path-like variables without the onset of suicidal
} feelings.

Cool.

} Also, typeset +T doesn't work.
} 
} Feel free to destruction test this.

There seem to be some differences between "special" tied variables and user
defined ones.  Not a big deal, but it should perhaps be documented (lest
anyone get the idea that the special variables could cease to be special).
The stuff at <17> through <19> below might even be considered a bug, though
it behaves the same way as it did before this patch.

zagzig<1> typeset -T BAR bar
zagzig<2> bar=(x y z)
zagzig<3> typeset -U bar
zagzig<4> echo $BAR
x:y:z
zagzig<5> BAR=a:b:c:d:a
zagzig<6> echo $bar
a b c d a
zagzig<7> bar=($bar)
zagzig<8> echo $BAR
a:b:c:d
zagzig<9> bar="oops"
zagzig<10> echo $BAR

zagzig<11> bar=(a b c d)
zagzig<12> echo $BAR

zagzig<13> path="oops"
zagzig<14> echo $PATH
oops
zagzig<15> unset path
zagzig<16> echo $PATH

zagzig<17> path=(/usr/local/bin /bin /usr/bin /usr/sbin)
zagzig<18> echo $PATH

zagzig<19> printenv PATH
/usr/local/bin:/bin:/usr/bin:/usr/sbin

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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