Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: howto avoid ~irc in %~ ?
- X-seq: zsh-users 5082
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: howto avoid ~irc in %~ ?
- Date: Fri, 21 Jun 2002 18:11:50 -0500
- In-reply-to: <20020621175139.A16301@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <1020615232225.ZM2169@xxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.44.0206170009100.18681-100000@xxxxxxxxxxxxxxxx> <20020621175139.A16301@xxxxxxxxxxxxxxxxxxx>
In the last episode (Jun 21), Andy Spiegl said:
> Hi Bart and Wayne,
>
> I was really surprised to read this:
> > > Zsh doesn't do this all by itself. You must at some point have used ~irc
> > > before zsh would add an entry for irc to its hash table of named dirs.
> because I never use ~irc.
>
> But Waynes comment explains it:
> > Completing ~ names will also add it for you. For instance, if I type
> > "~w<TAB>" and get "~wayne", all other user home dirs have now been
> > cached.
>
> So I guess there is no way to avoid ~irc to appear instead of /var.
> Hm, unless I remove it from the cache. But how would I do that???
How about
chpwd() { unhash -d irc }
This lets you still use ~irc if you want, but by the time zsh gets
around to parsing %~, it'll be out of the hash.
--
Dan Nelson
dnelson@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author