From owner-freebsd-bugs Thu Sep 28 03:55:47 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id DAA10886 for bugs-outgoing; Thu, 28 Sep 1995 03:55:47 -0700 Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id DAA10857 for ; Thu, 28 Sep 1995 03:53:07 -0700 Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id LAA17757; Thu, 28 Sep 1995 11:54:54 +0100 From: Luigi Rizzo Message-Id: <199509281054.LAA17757@labinfo.iet.unipi.it> Subject: Re: bin/743: vi cannot edit a file where the name starts with + To: bostic@BSDI.COM Date: Thu, 28 Sep 1995 11:54:53 +0100 (MET) Cc: freebsd-bugs@freefall.freebsd.org In-Reply-To: <199509280220.TAA23341@freefall.freebsd.org> from "Keith Bostic" at Sep 27, 95 07:19:43 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1258 Sender: owner-bugs@FreeBSD.org Precedence: bulk > From: Keith Bostic > To: j@ida.interface-business.de > Cc: FreeBSD-gnats-submit@freebsd.org, mpp@mpp.minn.net > Subject: Re: bin/743: vi cannot edit a file where the name starts with + > Date: Wed, 27 Sep 1995 20:18:07 -0600 > > > But for removing a file starting with a dash, there's a well-known > > interface to work around it (--). I'd rather suggest for vi to also > > accept a ``--'' to end scanning the command line for options. > > I agree. Since nvi uses getopt(3), "--" does, in general, work. > exactly as it does in rm. > > Unfortunately, +cmd arguments are translated into -c cmd before > getopt is called, so the result in the case of a leading + sign > in an argument is not what the user wanted. > > I'll fix this in the next version of nvi. doesn't something like "./+filename_starting_with_+" work ? Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ====================================================================