This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Kludgy work-around for pwd problem


Hi,

I have this weird problem with pwd in the latest Cygnus 
installation.  I mentioned it last week; here's a simple 
shell session that demonstrates the problem:

administrator@NDEV04C ~
$ pwd
/cygdrive/d/home/steve

administrator@NDEV04C ~
$ cd ..

administrator@NDEV04C ~/..
$ pwd
/cygdrive/d/home/steve/..

administrator@NDEV04C ~/..
$ cd steve

administrator@NDEV04C ~/../steve
$ pwd
/cygdrive/d/home/steve/../steve

administrator@NDEV04C ~/../steve
$ cd ../steve

administrator@NDEV04C ~/../steve/../steve
$ pwd
/cygdrive/d/home/steve/../steve/../steve

administrator@NDEV04C ~/../steve/../steve
$

Notice that the problem is not just with the prompt string; 
that's just a symptom.  The real problem is with pwd.  
(Actually, I think it might be with the way cd sets the $PWD var.)

Anyway, if anyone else is having this problem, I came up with a 
really kludgy work-around, which I put in my .bashrc:

alias pwd="perl -e 'use Cwd; print cwd() . \"\n\"'"
export PS1='`pwd`$ '

Obviously you must have Perl installed for this to work.  

Any insight into this problem would be greatly appreciated.

Steve Molitor
smolitor@erac.com

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]