Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Setting paths with ~'s in values.
- X-seq: zsh-users 2175
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Danny Dulai <nirva@xxxxxxxxxxx>
- Subject: Re: Setting paths with ~'s in values.
- Date: Mon, 22 Feb 1999 20:58:54 -0800 (PST)
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <19990222172007.61479@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199902122018.PAA29284@xxxxxxxxxxxxxxxxxx> <990212140558.ZM11520@xxxxxxxxxxxxxxxxxxxxxxx> <19990222172007.61479@xxxxxxxxxxxxxxxxx>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxx>
Danny Dulai writes:
> Quoting Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx):
> >
> > for t_path in $(<${HOME}/.zpaths)
> > do
> > if
> > [[ -d $t_path ]]
> > then
> > eval path=\( $path $t_path \)
> > fi
> > done
>
> This didnt seem to add the paths with ~ in them because the ~ didnt get
> expanded in the test for existence.
Right, silly me. There was even some discussion of file expansion (or
more accurately, lack thereof) in [[ ... ]] expressions not long after
this.
> > and you don't need the extra step of removing the leading colon. But
> > there's a better, faster, smarter way to do the same thing:
> >
> > eval path=\( ${^$(<${HOME}/.zpaths)}'(|)(/)' \)
>
> Aftertmuch of fiddling with this, I found it works if I have NULL_GLOB set.
Didn't I send a follow-up about that? I thought I had ... using (N/)
is exactly the right thing there.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author