From owner-freebsd-bugs@freebsd.org Sun Oct 18 20:54:41 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0136A18058 for ; Sun, 18 Oct 2015 20:54:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67A66615; Sun, 18 Oct 2015 20:54:41 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by iofz202 with SMTP id z202so27429844iof.2; Sun, 18 Oct 2015 13:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=u3agYq00bFHAovbORqj5VRiC+0h+HVDPkGRQwdTwf5M=; b=MbFcamYmtRRFdfoNJSr7rQRdlM15PXT/zCyWD7gSKjqjUQNJ54vdvXUefeM7qZdhMq OJCDAIvnpAEea/UC92z1hLQQWD78lW4dOL542MVRK0TNG7hL4BakAdHIAl0aHd4T1a5n qV1p2dYTXoZgM4oaSQ26TXZkGAPaPCFNwAVwFpygyWHO1AUXjzSOxTW7twG048kzZNru IJgmzE3wX9wJNGUK3sa1InkQkjxJTg9zEqV64RNXDbMrytoHIhZzhOxnC+b61eKJ3Wul Mb0VAcMNRyLgx7LXksL9bRX6sxjBQb6QgViebPo6rICkYq1uXpSIsPglt4WtB+9WY3tZ ctsw== X-Received: by 10.107.36.17 with SMTP id k17mr27934884iok.9.1445201680788; Sun, 18 Oct 2015 13:54:40 -0700 (PDT) Received: from [22.35.162.86] ([172.56.8.45]) by smtp.gmail.com with ESMTPSA id kb4sm5203686igb.12.2015.10.18.13.54.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 Oct 2015 13:54:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [Bug 203279] /bin/expr operator : fails when the string has a leading hyphen. From: Garrett Cooper X-Mailer: iPhone Mail (13A452) In-Reply-To: Date: Sun, 18 Oct 2015 13:54:36 -0700 Cc: freebsd-bugs@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: <662168A7-44B1-4B58-B883-F2CAB93E3909@gmail.com> References: To: bugzilla-noreply@freebsd.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 20:54:41 -0000 > On Oct 18, 2015, at 12:25, bugzilla-noreply@freebsd.org wrote: >=20 > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203279 >=20 > Jilles Tjoelker changed: >=20 > What |Removed |Added > --------------------------------------------------------------------------= -- > CC| |jilles@FreeBSD.org >=20 > --- Comment #1 from Jilles Tjoelker --- > If options that take an option-argument of ":" can be excluded forever, a > simple workaround would be to skip option processing if there are 3 argume= nts > (excluding argv[0]) and the second argument is ":". >=20 > A stronger form of only treating "--" and "-e" as options would prevent ad= ding > any more options without compatibility problems. >=20 > Perhaps this is acceptable, since expr is not a utility where major extens= ions > are expected. It would also make FreeBSD more compatible with Linux/NetBSD.=