From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22600 invoked from network); 17 Jun 1999 15:49:48 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Jun 1999 15:49:48 -0000 Received: (qmail 17326 invoked by alias); 17 Jun 1999 15:49:28 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2395 Received: (qmail 17319 invoked from network); 17 Jun 1999 15:49:26 -0000 Message-Id: <9906171520.AA21502@ibmth.df.unipi.it> To: zsh-users@sunsite.auc.dk, Oliver Grimm Subject: Re: PROMPT In-Reply-To: "Oliver Grimm"'s message of "Thu, 17 Jun 1999 17:32:41 DFT." Date: Thu, 17 Jun 1999 17:20:48 +0200 From: Peter Stephenson Oliver Grimm wrote: > The /etc/zshrc file sources /etc/profile, which contains the following: > > if test -z "$EMACS" ; then > if [ -n "$ZSH_VERSION" ]; then > precmd () > { > if test "$UID" = 0; then > PS1="%m:`pwd -r` # " > else > PS1="%n@%m:`pwd -r` > " > fi > } > fi > fi > > I wonder if this was intended by the designer of the profile ? I can hardly believe it. The correct way of doing this, by the way, is setopt promptsubst PS1='%n@%m:`pwd -r`' or if you insist on having the physical directory (the -r argument to pwd), it might be better to have setopt chaselinks PS1='%n@%m:%/' but using precmd() just to get the raw directory into the prompt is serious overkill. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy