Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh and login shells.
- X-seq: zsh-users 2144
- From: Timothy J Luoma <public+Lists/Unix/Zsh/Users@xxxxxxx>
- To: "Larry P . Schrof" <schrof@xxxxxxxxxxx>
- Subject: Re: zsh and login shells.
- Date: Fri, 12 Feb 1999 21:46:22 -0500
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <199902122123.QAA05026@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199902122123.QAA05026@xxxxxxxxxxxxxxxxxx>
Author: "Larry P . Schrof" <schrof@xxxxxxxxxxx>
Date: Fri, 12 Feb 1999 15:22:16 -0600
ID: <199902122123.QAA05026@xxxxxxxxxxxxxxxxxx>
> [ -f ${HOME}/loc/bin/zsh ] && exec ${HOME}/loc/bin/zsh -l
>
> in my .login (and made .login executable).
>
> However, upon logging in, I simply get the ksh prompt, as if the
> conditional statement evaluated to false. When running this on the
> command line, it works just fine.
>
> I know the system ksh was reading my old .login file before I
> moved it out of the way and put in the (simple) new one.
What would happen when zsh starts and processes .login ?
Also, the condition should not be '-f', I would suggest something like this
check that it IS executable
and NOT a directory
and NOT a link
if [ -x ${HOME}/loc/bin/zsh \
-a ! -d ${HOME}/loc/bin/zsh \
-a ! -h ${HOME}/loc/bin/zsh ]; then
exec ${HOME}/loc/bin/zsh -l
fi
I would try putting that in .kshrc or equivalent.
(on 2nd thought, that may not be ksh syntax)
Can you change your shell to /bin/sh and put the above in .profile and see
if that works?
If you wanted to be more verbose:
if [ -x ${HOME}/loc/bin/zsh \
-a ! -d ${HOME}/loc/bin/zsh \
-a ! -h ${HOME}/loc/bin/zsh ]; then
exec ${HOME}/loc/bin/zsh -l
else
if [ -f ${HOME}/loc/bin/zsh ]; then
echo ${HOME}/loc/bin/zsh exists
else
echo ${HOME}/loc/bin/zsh not found
fi
if [ -d ${HOME}/loc/bin/zsh ]; then
echo ${HOME}/loc/bin/zsh is a directory
fi
if [ -h ${HOME}/loc/bin/zsh ]; then
echo ${HOME}/loc/bin/zsh is a link
fi
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author