Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Tilde (%~) prompt expansion inconsistent with named directories?
- X-seq: zsh-users 13048
- From: dackz <dackze@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Tilde (%~) prompt expansion inconsistent with named directories?
- Date: Mon, 21 Jul 2008 18:18:45 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=+BKWmg7XZ0UmQG5WMhkdL7DdujRzR2OgZ7zMOnOU5cs=; b=uPbh0hGVpq+j8VONCVl1dMsvVg/9ghf28AeVh3ee/ebvw+1L31Qzt6Qa+gWhaeQm3K 2QCrbxT+Zyio7LM3CHNT5ZNJx8tcCP4llmhnPIfe9Z933LCpp5i9MqfN1PX7Vdgf8IB+ J5w3gPLdNRtjg/lwjRT5CmunFCk/tEdT7+6Cg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=aRrSw0aWCV3KF5wCeC75yGaJQcxnTGtMUZhrCOh0DylKusGTG4CCqX6BWTZ5SW9+T3 cL4vDqv0OT/k6vpA1eZweiJdxDzhaesHdb1LdW8Ag2BYiQ2Oygm2LmQ4yNoVS48ZX6H6 QHMt3IUTpOle5bQ6QR246nsvPm+b/+veZsdX0=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
After starting up zsh, if I cd into another home folder, it prints out
the full path. If I then do "cd ~<tab>", it starts printing out the
named directory for the home folder.
For example:
$ cd /home/ftp
$ print -P '%~'
/home/ftp
$ cd ~<tab>
$ print -P '%~'
~ftp
I'm guessing this has to do with the named directory cache not being
populated. Shouldn't the expansion of %~ populate it automatically?
Also, how is a directory determined to be named in prompt expansion?
If I run "cd ~www-data", "print -P '%~'" prints /var/www instead of
~www-data. I actually prefer this behavior, but I'm wondering how zsh
makes the distinction in that case.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author