NetBSD Problem Report #40639
From apb@cequrux.com Sat Feb 14 08:45:42 2009
Return-Path: <apb@cequrux.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 4F32063C17C
for <gnats-bugs@gnats.NetBSD.org>; Sat, 14 Feb 2009 08:45:42 +0000 (UTC)
Message-Id: <20090214083802.07BCCE933D8@apb-laptoy.apb.alt.za>
Date: Sat, 14 Feb 2009 08:38:01 +0000 (UTC)
From: apb@cequrux.com
To: gnats-bugs@gnats.NetBSD.org
Subject: /bin/sh doesn't expand PS1
X-Send-Pr-Version: 3.95
>Number: 40639
>Category: standards
>Synopsis: /bin/sh doesn't expand PS1
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: standards-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Feb 14 08:50:00 +0000 2009
>Closed-Date: Wed Sep 12 18:07:18 +0000 2018
>Last-Modified: Wed Sep 12 18:07:18 +0000 2018
>Originator: Alan Barrett
>Release: NetBSD 5.99.7
>Organization:
Not much
>Environment:
System: NetBSD 5.99.7 i386
>Description:
According to SUSv3 <http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html>,
the shell should expand the value of PS1 before printing it
on every prompt. NetBSD's /bin/sh does not do that.
>How-To-Repeat:
It actually does this:
$ ( cd /tmp ; ENV='' /bin/sh -i )
$ PS1='${PWD} $ '
${PWD} $
It should do this instead:
$ ( cd /tmp ; ENV='' /bin/sh -i )
$ PS1='${PWD} $ '
/tmp $
>Fix:
Expand PS1 when printing the prompt.
>Release-Note:
>Audit-Trail:
From: Richard Hansen <rhansen@bbn.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: standards/40639
Date: Fri, 13 Nov 2015 03:27:25 -0500
Link to a newer version of the standard:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03
Also see:
http://austingroupbugs.net/view.php?id=1006
-Richard
State-Changed-From-To: open->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Wed, 12 Sep 2018 18:07:18 +0000
State-Changed-Why:
This is now fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.