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

Re: howto avoid ~irc in %~ ?



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@xxxxxxxxxxxxxxx



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