Mail Archives: cygwin/2005/05/23/00:50:24
>>i'd like to use cygwin from a normal windows-app. The problem is, that i
>>need a login-shell, so that all environment-vars are properly set. The
>>problem: bash -li always changes the current workdir!
>
> That's not a problem, it's a feature.
>
>>IMHO, executing "bash -li" shouldn't change the workdir.
>
> Wrong!
>
>>No other system i know does that.
>
> Not true, "bash -li" works the same in any system that runs bash. You are
> probably thinking of running "bash" without the parameter... that execution
> doesn't change the current location.
>
> In fact, if you login into any system using any shell you login into your home
> dir. That's the idea that the -l or --login parameter make explicit.
On any Linux-system i know, bash is already started in the homedir of
the user, and /etc/profile does not include any cd-command. Read Igor's
reply, he got the point.
>>Script may rely on that behaviour.
>>
>>/etc/profile contains the like
>> cd "$HOME"
>>
>>That line cannot easily be removed. Starting the Cygwin-Link installed
>>by the setup wouldn't cd to ~ anymore. This behaviours is liked by most
>>users i guess (including my own).
>>
>>Any suggestions, how the situation could be improved?
>
> Yep, read the bash manual, learn to use bash.
>
> [Quote from man bash]
That quote didn't say anything about the current workdir. It just said,
that /etc/profile is executed. So the question still is, if it is legal
to have cd "$HOME" in there.
--
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/
- Raw text -