From nobody Sat Aug 20 09:20:43 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M8tQM72wQz4ZmTY for ; Sat, 20 Aug 2022 09:20:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M8tQM4Mqdz3vsK for ; Sat, 20 Aug 2022 09:20:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M8tQM3R8dzRjD for ; Sat, 20 Aug 2022 09:20:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 27K9Khwt035325 for ; Sat, 20 Aug 2022 09:20:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27K9Kh5i035324 for bugs@FreeBSD.org; Sat, 20 Aug 2022 09:20:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265399] /bin/sh: improve echo -e builtin Date: Sat, 20 Aug 2022 09:20:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: freebsd@oldach.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660987243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mcs/o2jOFISLJkHbNTJGzAFGOUc8shcGrJXXeoxYpgg=; b=wOGdv+8OUpet7oqM3nhWPNGlRfzM2ITa2AD7g2ZRqNeHX/dVh0Tga4HDRWO9NxqcfNHl1b x5hLZk83yUFE2PitC4aEE4Yf4yMqPmdxq+4vjyZfmxVFXugR4m2HSvdy0B/LXAcOav36fZ Hf6WdLdsDbfg/hbwZvyCAdccHaS1GsLarZtSe3Dd0kxR8GN7l1UzDwb5UAsEI4QIqd0Tud HVXflP8eA069gYPS81qHgJRQDUW/7QdjHU27KRmpa8SkPqLS5ETCDdjEwrfT5q8CzoM4eq /7H05/iVsnPr5hyHApuOrQB99b1hzB6c13AyOYqGmBTeTfDUSvOjYdRVUOZEdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660987243; a=rsa-sha256; cv=none; b=dxz2195JOtv1N0XWeGE9cLkV65Qr9trVajatJkFfb7lK2Lpte0+4wVltYGns+M10z9Y3fd 8vMLJLlvG/0hxTzUVm8u3bfIvT+n7TJxvtpc/36nlFYCzpl3U4DJBzNn/sMA/ZSR24oDeG U+I2WFdrNUIoElQxNdomJ8rM3fmj179QC23Bw2KyAWtCdTqpDZpA2mRLXZxPKD/rUWj2Wc Pfgz02xO8dsW6YACelyes94iBzuIsDsbXyecFh235Pw9RrU4BhBIxrkQmuxZGUAY4sAr4G WPdZSUouzDLTX3HgUaxm+nFHK42p7qGYjKaFw+xuQqc6prOA6J+8kwNIqg2dOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265399 --- Comment #5 from Helge Oldach --- (In reply to Jilles Tjoelker from comment #3) > For example, the existing echo builtin allows 'echo -n STRING' for any st= ring, while the proposed patch breaks this for the string "-e". True, so we shouldn't loop over the arguments but only validate the first argument against being a string of options and check for '-en' or '-ne'. Th= is will also keep it in line with other built-ins. > Also note that -ne can be replaced by -e and adding \c to the last operan= d. True as well, but then the '-e' option and the '\\' detection logic could be removed as it's undocumented anyhow... --=20 You are receiving this mail because: You are the assignee for the bug.=