From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15794 invoked from network); 21 Jun 2002 23:53:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Jun 2002 23:53:18 -0000 Received: (qmail 6507 invoked by alias); 21 Jun 2002 23:53:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5084 Received: (qmail 6496 invoked from network); 21 Jun 2002 23:53:07 -0000 Date: Fri, 21 Jun 2002 18:53:06 -0500 From: Dan Nelson To: zsh-users@sunsite.dk Subject: Re: howto avoid ~irc in %~ ? Message-ID: <20020621235306.GB59715@dan.emsphone.com> References: <1020615232225.ZM2169@candle.brasslantern.com> <20020621175139.A16301@radiomaranon.org.pe> <20020621231150.GA59715@dan.emsphone.com> <20020621184005.A23074@radiomaranon.org.pe> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020621184005.A23074@radiomaranon.org.pe> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.1i In the last episode (Jun 21), Andy Spiegl said: > Oops, I reacted too fast :-) > > > chpwd() { unhash -d irc } > This works great, if irc still is in the hash, but throws: > unhash: no such hash table element: irc > after every directory change if it isn't. > > Hm, how would I test if it is in the hash before removing it? chpwd() { unhash -d irc 2>& /dev/null } masks it; that's probably as good as you can get. -- Dan Nelson dnelson@allantgroup.com