Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Wildcards in path question
- X-seq: zsh-workers 2897
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: olsenc@xxxxxxxxxxxxxxxx (Clint Olsen)
- Subject: Re: Wildcards in path question
- Date: Tue, 11 Feb 1997 16:11:58 +0000 (GMT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <19970210172745.55371@xxxxxxxxxxxxxxxxxxxxx> from "Clint Olsen" at Feb 10, 97 05:27:45 pm
Clint Olsen wrote:
>Thanks for your help getting wildcards in my path. I was wondering how I
>might be able to use them so that they are added to my path iff they
>existed. We have a very heterogenous environment here and certain
>directories (like /opt) exist on some of the machines. Otherwise, the
>non-existence causes the expansion to barf out. I'd rather it fail
>silently somehow to allow the sourcing of my environment to continue.
The NULL_GLOB option causes glob patterns that don't match anything to
expand to nothing, rather than causing an error. This can be turned on
for a single glob pattern by using the (N) modifier:
path=( "$path[@]" /opt/*/bin(N) )
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author