[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which Bash

From: Bob Proulx
Subject: Re: Which Bash
Date: Sun, 24 Feb 2008 12:14:36 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Paul Jarc wrote:
> Charlse Darwin wrote:
> > i.e. How do I get the latest to be the login shell?
> You could add "exec bash" as the last command in ~/.bash_profile.

I think I would avoid doing that unless the user is aware of the
sublte and complex relationships that exist there.  The bash_profile
is read by the old shell and not the new one and syntax must match.
The exec should be the last execution line in the file and the script
will not continue past it.  Things that change the shell option
configuration won't bridge to the new shell process but would
otherwise normally be active from the profile.  It won't change the
shell used by sshd for remote shells and in that case it would still
use the configured login shell.  Other things.

I have seen too many users get very confused by these things.  Because
of this it scares me to think that other people will do that without
knowing all that they are doing by it and will then confuse themselves
by the behavior in the corner cases.  It's not bad, just quite subtle.
But it is certainly a useful technique to have available.  I am not
saying don't do it.  But I am thinking that if someone needs to ask
about it then they aren't enough aware of the issues to use it safely.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]