When you reference a directory in the form ~ref, the shell assumes that you want the directory displayed in this form; thus simply typing echo ~ref or cd ~ref causes the prompt to be shortened:
/usr/princeton/common/src/news/nntp/inews % inews=$PWD
/usr/princeton/common/src/news/nntp/inews % : ~inews
~inews % echo "wow!"
wow!
~inews % unset inews
/usr/princeton/common/src/news/nntp/inews %
This is so handy, the authors of An Introduction to the Z Shell made it a one liner:
% namedir() { eval $1=\$PWD ; : ~$1 }
Source: An Introduction to the Z Shell