[10513] in Athena Bugs

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

RS/6000 vi

daemon@ATHENA.MIT.EDU (John Carr)
Tue May 25 02:57:47 1993

To: bugs@Athena.MIT.EDU
Date: Tue, 25 May 1993 02:57:43 EDT
From: John Carr <jfc@Athena.MIT.EDU>


For a good time, run "vi -c" or "view -c" on an RS/6000.  I'm not sure
what "-c" is supposed to do, but what it does is this:

	vi starts by trying to edit the first environment variable
	(if xlogin was used, this is probably "DISPLAY=0:0")

	":q" says "-2 more file to edit"

	":n" tries to edit the next environment variable (in my case,
	"EDITOR=/usr/athena/bin/emacsclient")

	":q" now says "-3 more files to edit"

	":n", if repeated enough times, causes vi to print "No current
	filename" around the time it reaches the end of the environment.

	":q" says there is a 2 digit negative number of files left to
	edit.

	":n", one more time, causes vi to dump core.


vi does not do this on other systems.

On Solaris, "vi -c" returns an error:

	vi: option requires an argument -- c
	Usage: vi [- | -s] [-l] [-L] [-R] [-r [file]] [-t tag]
	       [-v] [-V] [-x] [-C] [+cmd | -c cmd] file...


If the correct usage is "vi -c cmd filename" then it makes some sense
(to a sufficiently warped mind) that "vi -c" would act as it does.  vi
must be reading NULL as the command and the next string past the
argument list as the filename.


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