Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2012 05:13:16 +0000
From:      "Teske, Devin" <Devin.Teske@fisglobal.com>
To:        Thomas Mueller <mueller23@insightbb.com>
Cc:        "<freebsd-stable@freebsd.org>" <freebsd-stable@freebsd.org>
Subject:   Re: less and vi fail on file whose name begins with +
Message-ID:  <13CA24D6AB415D428143D44749F57D7201D7B060@ltcfiswmsgmb21>
In-Reply-To: <DD.37.21507.2A0A3005@smtp02.insight.synacor.com>
References:  <DD.37.21507.2A0A3005@smtp02.insight.synacor.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Jul 15, 2012, at 10:03 PM, Thomas Mueller <mueller23@insightbb.com> wrot=
e:

> I notice in my latest build of FreeBSD 9.0-STABLE (#11), a problem with l=
ess and vi with files whose name begins with +.
>=20
> These files occur in /var/db/pkg/(pkg-name)/
>=20
> For instance, if I cd /var/db/pkg/png-1.4.8
> and type=20
> less +DESC=20
> I get
>=20
> Missing filename ("less --help" for help)
>=20
> but if I type the filename with full path, or even=20
> less ./+DESC=20
> it works OK
>=20
> I also tried going to /tmp and
> echo abcdefg > +junk1.txt
> and the same bug with less showed up (no problem with echo).
>=20
> I tried vi instead of less, not really wanting to edit the file,
> and vi tried to open a temporary file on /tmp with a strange name.
>=20
> Has anybody noticed this bug?  It affects i386 and amd64 at least.
>=20
> I have no access to test on other architectures.
>=20
> If this bug is found, we no doubt want it to be squashed before 9.1-RELEA=
SE.
>=20

Neither of these are "bugs" and I assure you they are as old as the hills (=
maybe not vi but always vim -- did you recently alias vi to vim?)

For less, try this:

less +/wheel < /etc/group

The + precedes an initial command. Similar with vi[m].

Simple way 'round is to use "--", e.g. below:

vi -- +DESC

--=20
Devin

_____________
The information contained in this message is proprietary and/or confidentia=
l. If you are not the intended recipient, please: (i) delete the message an=
d all copies; (ii) do not disclose, distribute or use the message in any ma=
nner; and (iii) notify the sender immediately. In addition, please be aware=
 that any message addressed to our domain is subject to archiving and revie=
w by persons other than the intended recipient. Thank you.



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