This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: zsh startup oddity
- From: Luke Kendall <luke dot kendall at cisra dot canon dot com dot au>
- To: cygwin at cygwin dot com
- Date: Mon, 4 Apr 2005 16:58:12 +1000 (EST)
- Subject: Re: zsh startup oddity
On 1 Apr, Michael Wardle wrote:
> By what mechanism are you ensuring zsh is invoked as a login shell
> rather than a non-login shell?
I think we were starting it via the cygwin shortcut (cygwin.bat), which
as you have said, just runs bash --login. IIRC, the way we were
starting zsh was via an exec inside the user's .profile. The trouble
was, the .profile was not being run if Cygwin's mkdir created the
/home mount point directory instead of Windows.
> Does $- include "i"?
> Does setopt show that interactive is on?
>
> With Cygwin 1.5.13, zsh 4.2.4-1 and the simple shell invocation utility
> posted to this list on March 24 <4242381E.2020008@endbracket.net> (which
> sets argv[0] to "-zsh"), zsh recognizes that it is a login shell and
> correctly sources .zprofile.
Ah! Looks perfect! Thanks, Michael, we'll give that a try.
> You've probably already checked these things, but I'd be surprised if
> this behavior was due to file permissions.
We weren't surprised - we were flabbergasted! Anyway, we'll give your
excellent shell.c a try and see how that goes.
Peter Castro replied to:
> > But /etc/passwd would source $HOME/.zprofile if /home had been created
> > by Windows Explorer.
>
> I am unable to reproduce this. Are you using the zsh.bat file provided
> or a custom startup bat file or just running the shell by itself? Please
> make sure you are using the '-l' option to force a login shell. zsh has
> greatly changed in a years time. Please consider upgrading to a later
> release.
No, we weren't using zsh.bat. Where does that get installed? I can't
find it, though I see I have zsh 4.2.4 installed from my very recent
complete re-install.
I like the sound of Michael's shell.c because you don't need a separate
..bat file to start up each different shell.
Thanks for the suggestions,
luke
luke
--
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/