From owner-freebsd-bugs Sat Dec 1 18:10: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 51ACC37B416 for ; Sat, 1 Dec 2001 18:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fB22A1g49113; Sat, 1 Dec 2001 18:10:01 -0800 (PST) (envelope-from gnats) Received: from pr0n.kutulu.org (pr0n.kutulu.org [151.196.107.157]) by hub.freebsd.org (Postfix) with ESMTP id 93B4C37B405 for ; Sat, 1 Dec 2001 18:00:05 -0800 (PST) Received: by pr0n.kutulu.org (Postfix, from userid 0) id A8B044CA; Sat, 1 Dec 2001 21:00:55 -0500 (EST) Message-Id: <20011202020055.A8B044CA@pr0n.kutulu.org> Date: Sat, 1 Dec 2001 21:00:55 -0500 (EST) From: kutulu Reply-To: kutulu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/32433: Cannot specify files beginning with + on ee command line. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 32433 >Category: bin >Synopsis: Cannot specify files beginning with + on ee command line. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 01 18:10:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: kutulu >Release: FreeBSD 4.4-STABLE i386 >Organization: KutuluWare Software Services >Environment: System: FreeBSD pr0n.kutulu.org 4.4-STABLE FreeBSD 4.4-STABLE #1: Mon Oct 29 16:56:42 EST 2001 root@pr0n.kutulu.org:/usr/obj/usr/src/sys/PR0N i386 >Description: The 'ee' command accepts a +# parameter, allowing one to jump immediately to a given line of the file specified on the command line. This makes it impossible to edit files beginning with a + without resorting to unusual syntax. For ee, at least, tehre is a simple fix for this problem. (For the record, pico, vi, and vim also suffer from this problem, however, vi/vim have alternate command-line options that start with +, so the fix is not nearly as obvious). >How-To-Repeat: echo "This is a text file" > +CONTENTS ee +CONTENTS >Fix: A work-around for this problem is to specify a pathname to the file that does not begin with +, as in: ee ./+CONTENTS ee /var/pkg/db/zip-2.3/+DESC This perhaps should be mentioned in the 'ee' man page, especially given the presumed target audience for ee (namely, beginners to FreeBSD and UNIX in general.) However, since the only valid options for the + command-lnie paramter are digits, ee can be fixed to work the way users probably want it to work by simply ignoring + before non-digits: --- usr.bin/ee/ee.c.old Sat Dec 1 20:40:09 2001 +++ usr.bin/ee/ee.c Sat Dec 1 20:41:45 2001 @@ -2094,7 +2094,8 @@ else if (*buff == '+') { buff++; - start_at_line = buff; + if isdigit(*buff) + start_at_line = buff; } else >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message