From owner-freebsd-bugs Wed Sep 27 03:50:05 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id DAA27448 for bugs-outgoing; Wed, 27 Sep 1995 03:50:05 -0700 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id DAA27442 ; Wed, 27 Sep 1995 03:50:02 -0700 Date: Wed, 27 Sep 1995 03:50:02 -0700 Message-Id: <199509271050.DAA27442@freefall.freebsd.org> To: freebsd-bugs Cc: From: Mike Pritchard Subject: Re: bin/743: vi cannot edit a file where the name starts with + Reply-To: Mike Pritchard Sender: owner-bugs@FreeBSD.org Precedence: bulk The following reply was made to PR bin/743; it has been noted by GNATS. From: Mike Pritchard To: joerg_wunsch@interface-business.de Cc: FreeBSD-gnats-submit@freebsd.org, bostic@cs.berkeley.edu Subject: Re: bin/743: vi cannot edit a file where the name starts with + Date: Wed, 27 Sep 1995 05:43:10 -0500 (CDT) J. Wunsch wrote: > > >Description: > > vi cannot edit a file that's name is starting with a plus sign. > > >How-To-Repeat: > > touch +foo > vi +foo > ~ > ... > ~ > /tmp/vi.014780: new file: line 1; The foo command is unknown. > > :e +foo yields the same. > > >Fix: > > Prepending a directory component (e.g. "./") works around the problem. From the vi man page: The following options are available: -c Execute cmd immediately after starting the edit session. Partic- ularly useful for initial positioning in the file, however cmd is not limited to positioning commands. This is the POSIX 1003.2 interface for the historic ``+cmd'' syntax. Nex/nvi supports both the old and new syntax. As for the "vi +foo" problem, note the "+cmd" syntax above. I don't think that I would consider this a real "bug". It seems to fall into the same category as trying to use rm to remove a file that starts with a dash (-) (and please, lets not get into a long discussion on that...). The ":e +foo" problem does look like a real bug. -- Mike Pritchard mpp@mpp.minn.net "Go that way. Really fast. If something gets in your way, turn"