From nobody Wed Oct 8 19:00:19 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 4chj4g4578z6BGkQ for ; Wed, 08 Oct 2025 19:00:19 +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 4chj4g3Wjxz3Z2N for ; Wed, 08 Oct 2025 19:00:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759950019; 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=zA5AETaQlFALlXtOo3FXceoLy+Pmo7J5WX9hN3ghBhc=; b=N9J6xX/WBlKnIIOUn8i0txto8FrPr+jzp4tSNaqkNeBF4T7eL6LIMsBSVQHHsQUs/jzNIf trtaVgpoxhL4oDtN6wwUKOWFlmEFUQCNsTzWtQ6O0HwbfrLBaxAOZcS+rbroaK6kzVkqJ5 zqTtklJXsMnGazaL5NdRKULMjHyhv3oscKvrWNueAxViolIiTLEqBEzYHFSN9GSXi+hqFA So9UEeYzoAm3F2XTeA4Vgd8Xpz5D1+r/IWIM18jg6HIDVXzAxfN7Y4Y5iZVz9cEuO0zOUj AbwFoiT6kY5kjer4Bmqg9hDYKeW10FLDydOiECjjnuGGVjcxr2IeLAWB6p5e/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759950019; 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=zA5AETaQlFALlXtOo3FXceoLy+Pmo7J5WX9hN3ghBhc=; b=wFx8YDuM1V3yPLjA0Oa/1Muph2NvfKsxF083Pgan39nrm9sQxTZwbBo5LT1ytnMm4NdCle Y56Bg8+wW5yyn+b6+tgxrlBzJPnQGSJfp9JvmIbMH7qASeHWW3aHDUkMKynYPS9MH3qfFY 1C8MQKj912POhRQk+C06N+xELe4tJzhIJrh4bLlJiNTJg1en6smMI0073/gz6cTC5gPkTt PHuFG2q12V9ctip9NpLVlm+KVZhwvlxPvrcYRuUqJpxj7f2sWFLeE5RHN66rUYpFUrGeOK /X/zgbBph3HqSkjxh2G6it2NHky9HeS4f9Ayc63ZnDl70Xa+soG/LvDBZ3vgsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759950019; a=rsa-sha256; cv=none; b=KnOcWa34TIw5GrgGmjt5nWBqGxT0CsdU0CFl288OehRSKPgcCF/J0PA+F8/ew9PlngSzD4 pLtHMXGVCk1UfjBRQ+ReRI2GbhpxyrEmKOXBrfU/B97JCITtPligXS3sZO/WSgcsnLwQIr BTSxv3cEwFoktD+8x+oqD2VDwheTS9Vi4/JetWuSOMWtocHwRI5CB6zm6nJkkDUQF4m20b V6emk5WM84CQ21dc6MsaM9PYG12oaKeExhz4l8BNA6KB1N/KX6I5GaVInAd+5bfcwRaGrn WPOnn6Qg5qKZ4zYMtK9df7ZgqVB9uJ54Af7y6bcyE94sHIh85w3cOt5qAlDnZQ== 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 4chj4g36H4zkF8 for ; Wed, 08 Oct 2025 19:00:19 +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 598J0JHB091874 for ; Wed, 8 Oct 2025 19:00:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 598J0JZC091873 for bugs@FreeBSD.org; Wed, 8 Oct 2025 19:00:19 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: Wed, 08 Oct 2025 19:00:19 +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: matthew@matthewphillips.info 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: cc 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 Matthew Phillips changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthew@matthewphillips.inf | |o --- Comment #18 from Matthew Phillips --- I've implemented parameter expansion support for PS1/PS2/PS4 prompts. The patch adds support for: - Simple variables: $USER, $PWD, $HOSTNAME - Braced variables: ${USER}, ${HOME} - Special parameters: $$, $?, $! - Positional parameters: $0, $1, etc. Tested via some shell scripts. The tests in tests/ weren't interactive and = PS1 requires it. Please advice if some test cases are needed and how to add the= m. Note: This implements parameter expansion only. Command substitution $(cmd)= is not yet supported and would require additional work. Attachment below. --=20 You are receiving this mail because: You are the assignee for the bug.=