YAPQ (yet another prompt question)

Jonathan I. Kamens jik at athena.mit.edu
Sat Aug 12 04:03:29 AEST 1989


In article <1157 at mitisft.Convergent.COM> kemnitz at mitisft.UUCP (Greg Kemnitz)
writes:
>In article <1356 at unhd.unh.UUCP> rg at unh.UUCP (Roger   Gonzalez) writes:
>>My second question had to do with 'make'.  Setting the prompt in .cshrc
>>seems to make it appear when you are running make and it spawns a shell
>>to handle cd's and the like.
>If you set your SHELL variable to /bin/sh (and have no prompt setting
>stuff in your .profile) before running make you won't have this
>problem - or you can take the prompt stuff and put it in your .login,
>but obviously you won't be able to do the type of prompt stuff you
>describe above.

  This avoids the problem rather than solving it.  What if Roger
*wants* make to use csh as its shell?

  The correct answer is that his .cshrc should be checking to see if
the prompt is already set to something before it sets it.  Since make
starts up a non-interactive shell, the prompt will not be set to
anything automatically by csh before it processes the .cshrc.
Therefore, if every instance of "set prompt =" in .cshrc is replaced
with "if ($?prompt) set prompt =" the problem will go away.

Jonathan Kamens			              USnail:
MIT Project Athena				432 S. Rose Blvd.
jik at Athena.MIT.EDU				Akron, OH  44320
Office: 617-253-4261			      Home: 216-869-6432



More information about the Comp.unix.questions mailing list