Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Builtin append() and prepend() to PATH, CDPATH, etc.
- X-seq: zsh-workers 1245
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: fclim@xxxxxxxxxxxxxx (Fung-Chai Lim)
- Subject: Re: Builtin append() and prepend() to PATH, CDPATH, etc.
- Date: Sun, 2 Jun 1996 23:26:10 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <9606021800.AA01569@xxxxxxxxxxxxxxxxxxxx> from Fung-Chai Lim at "Jun 3, 96 01:59:27 am"
> For example, zsh has `pushd_ignore_dups'. I think it would be easy
> to add a builtin function, say, `uniq-var' that, like `export', accept
> a variable list of arguments. An example is
> $ uniq-var PATH CDPATH MANPATH
>From zsh-2.6-beta17 you can use typeset -U path cdpath manpath which does
exactly what you want.
> After evaluating this statement, modifying any of the 3 variables
> would ensure no duplication:
> $ set path = (/usr/local/bin $path /usr/bin)
This is the csh syntax. In zsh you have to write
$ path=(/usr/local/bin $path /usr/bin)
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author