vi bug(feature?)

ramey at waltz ramey at waltz
Tue Jul 30 00:01:00 AEST 1985


I remember seeing the filename expansion from vi (or mail, or ...)
before.  We finally tracked down the problem to the fact that when
the csh was called to do the echo, it first printed out the prompt,
then the output of the echo, then the prompt again.  Note that this
only happened when you have a `set prompt ...' in your .cshrc.
If you use the default prompt, or set the prompt in your .login, there
was no problem.  Seems the csh knows it shouldn't print the prompt
in a non-interactive shell.  Instead of using an if statement around
the prompt printing code, they just don't give the prompt an initial
value, so the csh prints out a null prompt.  So, if you set your prompt
in the .cshrc file, the prompt is echoed.  The fix to the csh source
is easy; if you don't have source, just don't set the prompt in the .cshrc
(or as was pointed out before, only set the prompt in an interactive shell).

Joe Ramey
convex!smu!waltz!ramey



More information about the Comp.bugs.4bsd.ucb-fixes mailing list