sendbug(1) makes terrible assump - (nf)

liberte at uiucdcs.UUCP liberte at uiucdcs.UUCP
Tue Apr 24 08:53:00 AEST 1984


#R:vax4:-150900:uiucdcs:8200018:000:765
uiucdcs!liberte    Apr 23 16:53:00 1984

The previous suggestion to check $EDITOR and $VISUAL rather than
always using vi has a problem.  In checking them, they must already
be defined.  Use the following instead:

	replace the line...
		/usr/ucb/vi /tmp/bug$$
	with...
		if ($?VISUAL) then
			set editor = $VISUAL
		else if ($?EDITOR) then
			set editor = $EDITOR
		else set editor = /usr/ucb/vi
		endif
		$editor /tmp/bug$$

I also noticed that an expression such as:
	if ($?VISUAL && $VISUAL == "vi") echo It works.
doesnt work.  Although the manual says: "the operators are similar to those
of C," full expression evaluation is used and an error is given if $VISUAL
is not defined.

Daniel LaLiberte,  U of Illinois, Urbana-Champaign, Computer Science
{moderation in all things - including moderation}



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