Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 1995 03:50:02 -0700
From:      Mike Pritchard <mpp@mpp.minn.net>
To:        freebsd-bugs
Subject:   Re: bin/743: vi cannot edit a file where the name starts with +
Message-ID:  <199509271050.DAA27442@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/743; it has been noted by GNATS.

From: Mike Pritchard <mpp@mpp.minn.net>
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509271050.DAA27442>