RE: zsh as login shell

2005-10-25 Thread Williams, Gerald S \(Jerry\)
I started using zsh about 10 months ago myself. Now I can have
my favorite ksh feature (two argument cd) as well as all the
things I like in BASH. But I digress...

I edited my /etc/profile, replacing bash with zsh, though that
of course doesn't help me start ZSH from Windows.

To get that, I copied the Shortcut created by Cygwin (the one
that runs BASH) and changed the Target to:
  C:\cygwin\bin\zsh.exe -l -i

-l is login
-i is interactive (I suspect you don't need it)

Although I probably have an unjustified aversion to adding
layers of BAT-file abstraction. The "mkzsh" tool does sound
easier.

gsw


--
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/



Re: zsh as login shell

2005-10-25 Thread Corinna Vinschen
On Oct 25 11:38, Vaclav Haisman wrote:
> 
> 
> On Mon, 24 Oct 2005, Thorsten Kampe wrote:
> 
> >Urgh, /top-posting/,
> Huh?

http://cygwin.com/acronyms/#TOFU


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat, Inc.

--
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/



Re: zsh as login shell

2005-10-25 Thread Vaclav Haisman



On Mon, 24 Oct 2005, Thorsten Kampe wrote:


Urgh, /top-posting/,

Huh?



* Václav Haisman (2005-10-24 13:35 +0100)

What about editing /etc/passwd?


That's only used for remote logins (ssh, etc.)



Vaclav Haisman


--
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/

RE: zsh as login shell

2005-10-24 Thread Com MN PG P E B Consultant 3
 
> Use mkzsh to do this.  For help, type 'mkzsh --help'

Thank you, this is exactly what I was looking for.

> > It works kind of, but I can't get zsh executed as login 
> shell. The BAT
> > file invoking the bash login shell calls bash using
> >
> >  bash --login -i
> 
> See the '-l' option of zsh in the manpages.

Thank you, this works equally well.

I had searched the manpages for this option, but overlooked it...

Ronald

--
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/



Re: zsh as login shell

2005-10-24 Thread Peter A. Castro

On Mon, 24 Oct 2005, Com MN PG P E B Consultant 3 wrote:

Greetings, Ronald,


I would like to have on my Windoze desktop an Icon for zsh running under

Cygwin, similar to the standard Cygwin Icon which runs a bash login
shell, so that I can choose whether to get a window using bash or using
zsh.


Use mkzsh to do this.  For help, type 'mkzsh --help'

eg:

mkzsh --desktop


It works kind of, but I can't get zsh executed as login shell. The BAT
file invoking the bash login shell calls bash using

 bash --login -i


See the '-l' option of zsh in the manpages.

eg:

zsh -l


but zsh has no equivalent to the --login option, so I just use

 zsh -i

which makes the shell interactive, but not login. Zsh considers itself a
login
shell iff it is called under a name starting with a dash.

Is there an elegant solution to this problem? Of course I could

 cp -- zsh -zsh

and call -zsh, but I would have then to redo this everytime I update zsh
to a
newer version. Another possibility would be to execute a shell script
using
bash and in this script do an

 exec -a -zsh zsh -I

But maybe someone knows a better way to do this?

Ronald
--
Ronald Fischer <[EMAIL PROTECTED]>


--
Peter A. Castro <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]>
"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
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/



Re: zsh as login shell

2005-10-24 Thread Igor Pechtchanski
On Mon, 24 Oct 2005, Thorsten Kampe wrote:

> * Igor Pechtchanski (2005-10-24 16:36 +0100)
> > On Mon, 24 Oct 2005, Com MN PG P E B Consultant 3 wrote:
> >> I would like to have on my Windoze desktop an Icon for zsh running under
> >> Cygwin...
> >> [snip]
> >> Zsh considers itself a login shell iff it is called under a name
> >> starting with a dash.
> >> [snip]
> >> Another possibility would be to execute a shell script using bash and in
> >> this script do an
> >>
> >>   exec -a -zsh zsh -I
> >>
> >> But maybe someone knows a better way to do this?
> >
> > The latter sounds like the best solution.  You could do it directly from
> > the batch file by using
> >
> > bash -c 'exec -l /usr/bin/zsh -i'
>
> zsh perfectly knows -l/--login. It's the "-i" that's not needed

Thanks for the clarification, Thorsten.  As I don't know anything about
using zsh, I was suggesting a way of modifying cygwin.bat appropriately.

The above method could be used for shells that don't understand --login
(e.g., ash) or those where using the --login flag is inconvenient (e.g.,
when you want to pass more options to a tcsh login shell).
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/



Re: zsh as login shell

2005-10-24 Thread Thorsten Kampe
* Igor Pechtchanski (2005-10-24 16:36 +0100)
> On Mon, 24 Oct 2005, Com MN PG P E B Consultant 3 wrote:
>> I would like to have on my Windoze desktop an Icon for zsh running under
>> Cygwin...
>> [snip]
>> Zsh considers itself a login shell iff it is called under a name
>> starting with a dash.
>> [snip]
>> Another possibility would be to execute a shell script using bash and in
>> this script do an
>>
>>   exec -a -zsh zsh -I
>>
>> But maybe someone knows a better way to do this?
> 
> The latter sounds like the best solution.  You could do it directly from
> the batch file by using
> 
> bash -c 'exec -l /usr/bin/zsh -i'

zsh perfectly knows -l/--login. It's the "-i" that's not needed


--
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/



Re: zsh as login shell

2005-10-24 Thread Thorsten Kampe
* Com MN PG P E B Consultant 3 (2005-10-24 13:49 +0100)
>> What about editing /etc/passwd? Pesonally, I use customized 
>> cygwin.bat.
> 
> How exactly would this work? After all, we are talking about Windows
> Batch skripts,
> don't we? And they are not aware of /etc/passwd. 
> 
> But maybe I didn't get your point. How do you suggest that I should
> modify my /etc/passwd?

Why don't you try it, consultant?! There's actually just a single
entry referring to a shell.


--
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/



Re: zsh as login shell

2005-10-24 Thread Thorsten Kampe
Urgh, /top-posting/,

* Václav Haisman (2005-10-24 13:35 +0100)
> What about editing /etc/passwd?

That's only used for remote logins (ssh, etc.)


--
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/



Re: zsh as login shell

2005-10-24 Thread Thorsten Kampe
* Com MN PG P E B Consultant 3 (2005-10-24 11:11 +0100)
> I would like to have on my Windoze desktop an Icon for zsh running under
> 
> Cygwin, similar to the standard Cygwin Icon which runs a bash login
> shell,
> so that I can choose whether to get a window using bash or using zsh.

mkzsh
 
> It works kind of, but I can't get zsh executed as login shell. The BAT
> file
> invoking the bash login shell calls bash using
> 
>   bash --login -i
> 
> but zsh has no equivalent to the --login option, so I just use
> 
>   zsh -i

Please, start making sense:
zsh --help | grep -- --login
 

> But maybe someone knows a better way to do this?

Start reading the fine zsh manual *now*, please


--
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/



Re: zsh as login shell

2005-10-24 Thread Igor Pechtchanski
On Mon, 24 Oct 2005, Com MN PG P E B Consultant 3 wrote:

> I would like to have on my Windoze desktop an Icon for zsh running under
> Cygwin...
> [snip]
> Zsh considers itself a login shell iff it is called under a name
> starting with a dash.
> [snip]
> Another possibility would be to execute a shell script using bash and in
> this script do an
>
>   exec -a -zsh zsh -I
>
> But maybe someone knows a better way to do this?

The latter sounds like the best solution.  You could do it directly from
the batch file by using

bash -c 'exec -l /usr/bin/zsh -i'

HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
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/



Re: zsh as login shell

2005-10-24 Thread Chris Taylor

Corinna Vinschen wrote:

On Oct 24 14:49, Com MN PG P E B Consultant 3 wrote:

What about editing /etc/passwd? Pesonally, I use customized 
cygwin.bat.


How exactly would this work? After all, we are talking about Windows
Batch skripts,
don't we? And they are not aware of /etc/passwd. 


But maybe I didn't get your point. How do you suggest that I should
modify my /etc/passwd?



Using an editor?


Corinna



I think he means what modifications should he make..

--

Spinning complacently in the darkness, covered and blinded by a blanket
of little lives, false security has lulled the madness of this world
into a slumber. Wake up! An eye is upon you, staring straight down and
keenly through, seeing all that you are and everything that you will
never be. Yes, an eye is upon you, an eye ready to blink. So face
forward, with arms wide open and mind reeling. Your future has
arrived... Are you ready to go?

--
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/



Re: zsh as login shell

2005-10-24 Thread Corinna Vinschen
On Oct 24 14:49, Com MN PG P E B Consultant 3 wrote:
> > What about editing /etc/passwd? Pesonally, I use customized 
> > cygwin.bat.
> 
> How exactly would this work? After all, we are talking about Windows
> Batch skripts,
> don't we? And they are not aware of /etc/passwd. 
> 
> But maybe I didn't get your point. How do you suggest that I should
> modify my /etc/passwd?

Using an editor?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat, Inc.

--
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/



RE: zsh as login shell

2005-10-24 Thread Com MN PG P E B Consultant 3
> What about editing /etc/passwd? Pesonally, I use customized 
> cygwin.bat.

How exactly would this work? After all, we are talking about Windows
Batch skripts,
don't we? And they are not aware of /etc/passwd. 

But maybe I didn't get your point. How do you suggest that I should
modify my /etc/passwd?

Ronald

--
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/



Re: zsh as login shell

2005-10-24 Thread Václav Haisman
What about editing /etc/passwd? Pesonally, I use customized cygwin.bat.

Václav Hasiman


Com MN PG P E B Consultant 3 wrote:
> I would like to have on my Windoze desktop an Icon for zsh running under
> 
> Cygwin, similar to the standard Cygwin Icon which runs a bash login
> shell,
> so that I can choose whether to get a window using bash or using zsh.
> 
> It works kind of, but I can't get zsh executed as login shell. The BAT
> file
> invoking the bash login shell calls bash using
> 
>   bash --login -i
> 
> but zsh has no equivalent to the --login option, so I just use
> 
>   zsh -i
> 
> which makes the shell interactive, but not login. Zsh considers itself a
> login
> shell iff it is called under a name starting with a dash.
> 
> Is there an elegant solution to this problem? Of course I could
> 
>   cp -- zsh -zsh
> 
> and call -zsh, but I would have then to redo this everytime I update zsh
> to a 
> newer version. Another possibility would be to execute a shell script
> using
> bash and in this script do an
> 
>   exec -a -zsh zsh -I
> 
> But maybe someone knows a better way to do this?
> 
> Ronald 



signature.asc
Description: OpenPGP digital signature