Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: howto avoid ~irc in %~ ?
- X-seq: zsh-users 5059
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Andy Spiegl <zsh.Andy@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: howto avoid ~irc in %~ ?
- Date: Sat, 15 Jun 2002 23:22:25 +0000
- In-reply-to: <20020614131646.A26271@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020614131646.A26271@xxxxxxxxxxxxxxxxxxx>
On Jun 14, 1:16pm, Andy Spiegl wrote:
}
} I use %~ in my prompt [but then] when I change to
} /var/www
} my prompt is:
} machine:~irc/www>
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.
E.g. starting from `zsh -f':
zagzig% cd /home/ftp
zagzig% pwd
/home/ftp
zagzig% print -P %~
/home/ftp
But:
zagzig% cd ~ftp
zagzig% pwd
/home/ftp
zagzig% print -P %~
~ftp
So if you don't want zsh to use the abbreviations, don't use them yourself.
Zsh does have a rule that it won't show the tilde-form if the real name of
the directory is shorter, but in the case of ~irc and /var they happen to
be exactly the same length.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author