From nobody Sun Oct 19 23:03:01 2025 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 4cqYxd493Nz6Cjrj for ; Sun, 19 Oct 2025 23:03:01 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cqYxd3TnRz3f97 for ; Sun, 19 Oct 2025 23:03:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760914981; 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=v2mXP6qCtYidyijCwKolKo4P8zPbz3F1xjk+3z9G530=; b=fSrGIvouXV2Hm+uBd46iP1yrAbT2YZ1QBWMSZS4WYIsdU+E59mV1aEjqlRUiiCJjC4/gV9 YFOOqrl3n97ID1U5RypCtjlZLNJoE8UEYIqKKeVIgvwptX7i3NKC6Uu65XH+jIwHVgaGfZ ztwJbm4MQjcbhiCezn+FQ1WyU816MSqW/LTK3kmkjMz7geytOQxZ1jn7HcZwylPrhPOfAA Gty2VlLKCkWeRv4U7PSp/zpkAZG0tn627dPJmJN/ApMmDcL9AKfbmKU4y+wksfj1j/m5t+ apapizyPBnGcBhLg0J1IsNXuY35M+kwEs3P5UTSJuV0x3DK+EpkACSm0arrImQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760914981; 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=v2mXP6qCtYidyijCwKolKo4P8zPbz3F1xjk+3z9G530=; b=FFKo71gmWDm1gfO/ugJe6wQz+aBohA6FKGuSRhTbOjgdE764EoR0nnSYWqFs9TOoqohIa5 Hxhini6gIopGNYMfoCnzjB/+8hzY9eUtB+jgxD4Bd99FULPIX7KYkLP57rBrvI6LZWvk95 +SD0G/JtWdpPCxPXFKXAHM/v3Ck9+ie8P6xdNL1hia/Ww0/23oMErYdojRchurv+He+bEs 2gHJYgiNOO680A47YvXWokhrxfCAfw+v4jIDRSx3gXbmxaJ6yJ7JUYaigN5TtJ6JPYl6Di c87hgYYeI/wUZG5q9NfL5hu5nwShdDDOM73DeKFR0FIQdrn/GUbaosYSfLSuCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760914981; a=rsa-sha256; cv=none; b=OPOzL6f5L5hTLsbyqSno7S0G9UxRgR5qfcJc/VBHTWNlo+BTpdu5FSYbORg9mFUYXK4kxx EkOK4OZlebGPOIlWifyk85wuFvnB/3WhL9KHdK+PM4R8Y9Za6NmqJY+63sD31xX+dWID10 xHNAVe4G+JeJ3E8A/ZJGkwJmBqfXhK7MY3dnk4CE6txQD6GodqiH0RZCCiVQA9HPKi/g8m tXddOmFcWHpElUR7bbX3caV3ofDzayFDiwcrWfAOdy4RH+l+bFRmlwDeBZCQ8JUW/k7xbW 3asshAGo1HbNJzLh+BCTbl03ejKClqE3oASeiE3op7pF+fpu3woz0lwpXUG+yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cqYxd320GzmyS for ; Sun, 19 Oct 2025 23:03:01 +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 59JN31hT025581 for ; Sun, 19 Oct 2025 23:03:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 59JN31he025580 for bugs@FreeBSD.org; Sun, 19 Oct 2025 23:03:01 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 46441] sh(1): Does not support PS1, PS2, PS4 parameter expansion Date: Sun, 19 Oct 2025 23:03:01 +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: CURRENT X-Bugzilla-Keywords: feature, needs-patch, needs-qa, standards X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jilles@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D46441 --- Comment #22 from Jilles Tjoelker --- Comment on attachment 264503 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D264503 PS1/PS2 parameter expansion patch v2 I like it. Please confirm the author name and email address to be written i= nto Git. I have some nits but I can fix them myself. Nit: existing code does not check `is_in_name` on the same character `is_na= me` returned true for, but increments the pointer (`fmt` here) in between. Nit: line 2124 till 2132 (`/* Positional parameters - check digits FIRST */` and `} else if (namelen =3D=3D 1 && is_special(*varname)) {`) are not inden= ted correctly. Nit: `valbuf` on line 2134 is `static` but if `varname` above can live on t= he stack then so can `valbuf`. Some things like `$-` and `${10}` don't work but let's not add them to avoid adding even more duplicated code. I expect the implemented parts to be almo= st all of what people will actually use. --=20 You are receiving this mail because: You are the assignee for the bug.=