Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh and login shells.



	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