22 Jul 00:17
Tilde (%~) prompt expansion inconsistent with named directories?
From: dackz <dackze <at> gmail.com>
Subject: Tilde (%~) prompt expansion inconsistent with named directories?
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-07-21 22:18:45 GMT
Expires: This article expires on 2008-08-05
Subject: Tilde (%~) prompt expansion inconsistent with named directories?
Newsgroups: gmane.comp.shells.zsh.devel
Date: 2008-07-21 22:18:45 GMT
Expires: This article expires on 2008-08-05
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.
RSS Feed