[1466] in athena10
Re: bashrc should set PS1 or cshrc should not set prompt
daemon@ATHENA.MIT.EDU (Tim Abbott)
Tue Mar 10 11:05:56 2009
Date: Tue, 10 Mar 2009 10:59:19 -0400 (EDT)
From: Tim Abbott <tabbott@MIT.EDU>
To: Jonathan Reed <jdreed@mit.edu>
cc: debathena@mit.edu
In-Reply-To: <09F5C627-B135-406A-A982-71323027A5AD@mit.edu>
Message-ID: <alpine.DEB.1.10.0903091514350.26041@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 8 Mar 2009, Jonathan Reed wrote:
> In the process of updating the Dotfiles document, I noticed that
> /usr/athena/lib/init/bashrc no longer sets PS1. Discussion on zephyr
> today suggests that this was a conscious change. I noted that there's a
> lot of value in us being able to refer to and document "the athena
> prompt", but it was pointed out that debathena-standard breaks this
> anyway, since the prompt will likely be the shell's default.
One thing to keep in mind is that as far as I know, nobody runs tcsh with
debathena-standard (or really, anywhere that isn't Athena). So this
argument is largely about bash, though I can see wanting to have bash and
tcsh be consistent.
> However, it seems like a bad idea to have skew between the shells.
>
> If it were up to me, I'd solve it by setting PS1="athena\$" in bashrc.
> But the consensus seems to be that that's objectionable and a step
> backwards. Therefore, I propose one of the following:
>
> a) When we transition to bash in April, we bump .generation to "2", and then
> change /usr/athena/lib/init/cshrc to set the prompt to "athena%#" (ie: the
> current value of $prompt) for .generation < 2, and not set prompt otherwise.
>
> b) Unset $prompt in cshrc. The current default prompt on tcsh seems to be
> "%U%m%u:%B%~%b%#" (the hostname underlined, a colon, pwd in bold, and ">"
> unless it's a root shell).
>
> I prefer (a).
If we're going to go this route, I think (b) is the better choice (and we
should do it on Athena 9 as well at the same time). Prompt appearance
depending on shell is much less confusing than depending on something
obscure like when their account was created.
> Additionally, if any other customizations were removed from bashrc that are
> present in cshrc (modulo fundamental shell differences that don't apply), we
> should address those (either in documentation, or by changing cshrc to match
> bashrc).
In terms of user-facing documentation, I'd just put this stuff in the
"migrating to bash" document, since the only time this information
information would be relevant to a user is when they switch shells (though
I can see why you might want to have another document with differences in
default customizations for OLC consultants to reference).
-Tim Abbott