zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Andy Spiegl <zsh.Andy@spiegl.de>, zsh-users@sunsite.dk
Subject: Re: howto avoid ~irc in %~ ?
Date: Sat, 15 Jun 2002 23:22:25 +0000	[thread overview]
Message-ID: <1020615232225.ZM2169@candle.brasslantern.com> (raw)
In-Reply-To: <20020614131646.A26271@radiomaranon.org.pe>

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   


  reply	other threads:[~2002-06-15 23:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-14 18:16 Andy Spiegl
2002-06-15 23:22 ` Bart Schaefer [this message]
2002-06-17  7:12   ` Wayne Davison
2002-06-21 22:51     ` Andy Spiegl
2002-06-21 23:11       ` Dan Nelson
2002-06-21 23:40         ` Andy Spiegl
2002-06-21 23:53           ` Dan Nelson
2002-06-21 23:54           ` Bart Schaefer
2002-06-21 23:59             ` Will Yardley
2002-06-22  0:41             ` Andy Spiegl
2002-06-22  0:57               ` Clint Adams
2002-06-22  2:04               ` Wayne Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1020615232225.ZM2169@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    --cc=zsh.Andy@spiegl.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).