From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27129 invoked from network); 23 Feb 1999 08:29:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Feb 1999 08:29:17 -0000 Received: (qmail 13353 invoked by alias); 23 Feb 1999 08:28:09 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2175 Received: (qmail 13327 invoked from network); 23 Feb 1999 08:28:06 -0000 X-Authentication-Warning: c-bart.amazon.com: schaefer set sender to schaefer@tiny.zanshin.com using -f From: Bart Schaefer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14034.13710.335334.486111@c-bart.amazon.com> Date: Mon, 22 Feb 1999 20:58:54 -0800 (PST) To: Danny Dulai Cc: zsh-users@sunsite.auc.dk Subject: Re: Setting paths with ~'s in values. In-Reply-To: <19990222172007.61479@bleep.ishiboo.com> References: <199902122018.PAA29284@po_box.cig.mot.com> <990212140558.ZM11520@candle.brasslantern.com> <19990222172007.61479@bleep.ishiboo.com> X-Mailer: VM 6.65a under Emacs 20.3.5.1 Reply-To: Bart Schaefer Danny Dulai writes: > Quoting Bart Schaefer (schaefer@brasslantern.com): > > > > 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.