This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: Cygwin.bat doesn't save original directory in OLDPWD after login


On Sun, Aug 17, 2008 at 04:50:10PM +0400, Andry wrote:
>If run cygwin from cmd.exe from random directory, for example, from
>"c:\blablabla", then after login OLDPWD would be "/usr/bin" instead
>original directory.  So command cd "$OLDPWD" just after login restores
>wrong directory.  This is because batch file has been wroten
>incorrectly.  This is correct:
>
>"%~dp0bin\bash" --login -i

I don't see how that can be correct.  There seems to be some inexplicable
mangling in the above.

However, the cygwin.bat file isn't really intended to be the way you
"run cygwin" from everywhere.  If you want to run bash then run
c:\cygwin\bin\bash.  Add c:\cygwin\bin to your PATH and you won't even
have to type the path.  Just type "bash".

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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