zsh-workers
 help / color / mirror / code / Atom feed
* bug in FAQ section 1.7?
@ 2000-04-03 13:29 Adam Spiers
  2000-04-03 15:05 ` Bart Schaefer
  2000-04-03 18:13 ` Zefram
  0 siblings, 2 replies; 3+ messages in thread
From: Adam Spiers @ 2000-04-03 13:29 UTC (permalink / raw)
  To: zsh workers mailing list

Under the section:

sect(I don't have root access: how do I make zsh my login shell?)

  If you have zsh in a subdirectory mytt(bin) of your home directory,
  put this in .profile:
              ^^^^^^^^

I tried this in order to get my default shell on zsh.sourceforge.net
to be the one in /home/groups/zsh/bin, but it doesn't work.  If I make
it .zprofile however, I just get an endless loop, and the SF guys
probably aren't too keen on fork bombs, even linear ones :-)

What's the correct way of doing it?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug in FAQ section 1.7?
  2000-04-03 13:29 bug in FAQ section 1.7? Adam Spiers
@ 2000-04-03 15:05 ` Bart Schaefer
  2000-04-03 18:13 ` Zefram
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2000-04-03 15:05 UTC (permalink / raw)
  To: Adam Spiers, zsh workers mailing list

On Apr 3,  2:29pm, Adam Spiers wrote:
} Subject: bug in FAQ section 1.7?
}
} sect(I don't have root access: how do I make zsh my login shell?)
} 
}   If you have zsh in a subdirectory mytt(bin) of your home directory,
}   put this in .profile:
}               ^^^^^^^^

That only applies if your login shell isn't already zsh.  You can't use
it to switch from one version of zsh to another.

You can either use chsh to set your shell back to bash and then use
the .profile trick to invoke /home/groups/zsh/bin/zsh, or you can use
something like this in .zprofile:

typeset -U zsh
zsh=('' /home/groups/zsh/bin/zsh(|-)*(N))
if [[ $#zsh -ne 1 &&
	( $SHELL != $zsh[-1] || zsh-$ZSH_VERSION < $zsh[-1]:t ) ]] &&
    $zsh[-1] -fc 'exit 0'
then
    export SHELL=$zsh[-1]
    exec $SHELL -$-
fi

The above relies on the fact that zsh's "make install" puts both a `zsh'
and a `zsh-3.1.6-dev-21' into $bindir that are linked to each other.  I
haven't looked to see if /home/groups/zsh/bin/zsh/zsh-3.1.6-dev-21 is in
fact present on sourceforge; if it's not, the above at least won't go
into an infinite loop.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug in FAQ section 1.7?
  2000-04-03 13:29 bug in FAQ section 1.7? Adam Spiers
  2000-04-03 15:05 ` Bart Schaefer
@ 2000-04-03 18:13 ` Zefram
  1 sibling, 0 replies; 3+ messages in thread
From: Zefram @ 2000-04-03 18:13 UTC (permalink / raw)
  To: Adam Spiers; +Cc: zsh workers mailing list

Adam Spiers wrote:
>  If you have zsh in a subdirectory mytt(bin) of your home directory,
>  put this in .profile:
>              ^^^^^^^^
>
>I tried this in order to get my default shell on zsh.sourceforge.net
>to be the one in /home/groups/zsh/bin, but it doesn't work.

Your login shell should be /bin/sh, which will execute .profile.  I use
this technique consistently on all systems, regardless of whether or not
the zsh I want to use is permitted as a login shell.  I find it useful
to have a consistent, same-everywhere environment to run my login stuff.

I'm always wary about making .profile unconditionally exec another shell,
though, especially when it's a shell likely to get updated.  For paranoia,
the first thing in my .profile is

	test ."$TERM" = .un && exec /bin/sh

which provides a way to avoid all the cleverness if stuff goes
wrong.  (For more cleverness that could go wrong, have a look at
/home/users/zefram/.profile on SourceForge.)

-zefram


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-04-03 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-03 13:29 bug in FAQ section 1.7? Adam Spiers
2000-04-03 15:05 ` Bart Schaefer
2000-04-03 18:13 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).