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

Re: path and += troubles



Steven Klass wrote:
> Hi all,
>
> 	OK after reading the FAQ completely I am at my wits end.  I want to
> create three basic functions dealing with arrays
> 		- Append
> 		- Prepend
> 		- Delete

I don't know if this is exactly what you're looking for, but I think you can 
save yourself some work by just using direct operations.

Prepending/Appending:
path=( prepended $path appended )

I never bothered about a deletion function, because I simply use:
typeset -U path
which will keep only the first occurence of any element.

Hope this is of some help,

Christian



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