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

Re: How to clean up path most efficiently?



Jarkko Maja wrote:
> I have tons of directories in my $PATH, but only a
> handful of them are needed in each my machine; other
> directories simply do not exist. How could I clean up
> the non-existing dirs from my $PATH most efficiently?
> Doing a for loop in ~/.zshrc just for that sounds a
> bit overkill, but at least I couldn't spot anything
> like this on man page.

It should be as simple as:

path=($^path(N))

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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