From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 361 invoked from network); 1 Mar 1999 16:10:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Mar 1999 16:10:40 -0000 Received: (qmail 16995 invoked by alias); 1 Mar 1999 16:09:11 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2193 Received: (qmail 16986 invoked from network); 1 Mar 1999 16:09:09 -0000 Message-Id: <199903011610.LAA29744@po_box.cig.mot.com> Date: Mon, 1 Mar 1999 10:08:24 -0600 From: "Larry P . Schrof" To: zsh-users@sunsite.auc.dk Subject: Re: is this normal? References: <19990228211159.A30631@kappa.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <19990228211159.A30631@kappa.ro>; from Mircea Damian on Sun, Feb 28, 1999 at 09:11:59PM +0200 This brings up an interesting point. First, remember that in the / directory, the file .. just points back to / itself. Now, I tried the following quick experiment. Things to note: - I use %~ in my RPROMPT string. - $PWD seems to contain the 'pure' value of the current directory, pwd seems to heed any directory-processing options you have set (IE. chase_links) - Like the man page says, indeed, the various escape sequences expand to the 'pure' value of $PWD. lyric[79] cd / ~ lyric[80] cd ../etc / lyric[81] pwd /../etc /../etc lyric[82] echo $PWD /../etc /../etc lyric[83] cd / /../etc lyric[84] setopt chaselinks / lyric[85] cd ../etc / lyric[86] pwd /../etc /etc lyric[87] echo $PWD /../etc /../etc lyric[88] echo $ZSH_VERSION /../etc 3.1.5 One way to resolve the quirkiness (but not necessarily the only) is to do command substitution in the PROMPT string by running pwd. (Don't forget to set the PROMPT_SUBST option) Note that for me, RPROMPT is the variable to change, since that's where I display the current directory. lyric[93] RPROMPT='$(pwd)' /../etc lyric[94] /etc This is only a quick fix for PROMPT-related issues. Other things such as the directory stack still receive 'pure' values of $PWD. Anyone else's thoughts? On Sun, Feb 28, 1999 at 09:11:59PM +0200, Mircea Damian wrote: > > Hello, > > I'm using zsh-3.1.5 on many x86 machines. All have the same behavior: > > dmircea@secu:~% cd / > dmircea@secu:/% cd ../bin > dmircea@secu:/../bin% echo $ZSH_VERSION > 3.1.5 > dmircea@secu:/../bin% pwd > /../bin > dmircea@secu:/../bin% > > > Is that '/../bin' canonical? Do I miss something here? > > -- > Mircea Damian > Network Manager > dmircea@roedu.net, dmircea@lbi.ro, dmircea@kappa.ro > MD65-RIPE, MD2225, MD1-6BONE > Phone: +40-1-4115246