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

Re: path/PATH function



sweth@xxxxxxxxxxxxxxxxxxxx said:
> my next question, then, is if  these do, in fact, work the way i
> surmised (that is, they remove redundancies  and map their
> colon-delimited versions onto the capitalized equivalent  variable).

Yes, but there's no removing of redundancies.  There's back-mapping too, if you set CDPATH then cdpath gets set.

sweth@xxxxxxxxxxxxxxxxxxxx said:
> also, what exactly is the format for defining them?  is it just
> paren-enclosed, space-delimited lists? 

Yes, standard array syntax.

sweth@xxxxxxxxxxxxxxxxxxxx said:
> the version of typeset on my system doesn't seem to support this
> option  (or at least, the man page doesn't mention it).  typeset
> doesn't return an error  if i try to use the -U switch, however; could
> someone summarize the syntax so i  could see if it is, in fact,
> implemented?

Try:

cdpath=(.. ..)
echo $cdpath	;# Should give ".. .."
typeset -U cdpath
echo $cdpath	;# Should give ".."

Works in my 3.1.2 beta, anyway.  I don't know whether typeset -U is in 3.0.5.



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