[3532] in testers

home help back first fref pref prev next nref lref last post

Re: stty run from cshrc on .logout invocation

daemon@ATHENA.MIT.EDU (Robert A Basch)
Thu Jun 4 14:28:34 1998

To: Greg Hudson <ghudson@MIT.EDU>
Cc: Robert A Basch <rbasch@MIT.EDU>, testers@MIT.EDU,
        source-developers@MIT.EDU
In-Reply-To: Your message of "Thu, 04 Jun 1998 13:50:39 EDT."
             <199806041750.NAA18398@small-gods.mit.edu> 
Date: Thu, 04 Jun 1998 14:28:24 EDT
From: Robert A Basch <rbasch@MIT.EDU>

> Perhaps we want to replace
> 
> 	if ($?prompt)
> 
> with
> 
> 	if ( -t 0 )

Keeping the test on prompt is the more conservative choice, assuming
the stty is actually needed here at all.  The -t 0 is effectively
the same as tty -s, though the latter is more portable.  Of course,
if only the sgi's do this, I guess portability isn't a concern...

> I thought, though, that ($?prompt) was generally only true for an
> interactive shell.  Odd that it's not true in this case.

Agreed.  I guess it depends on how you define "interactive" :)
I don't think we should mess with tcsh, though, at least not for
this problem, especially since csh does the same thing.

Bob



home help back first fref pref prev next nref lref last post