dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Berthold Lorke <berthold@lorke.de>
To: dash@vger.kernel.org
Subject: PS1 is not implemented as specified in IEEE Std 1003.1-2017
Date: Tue, 25 Jan 2022 22:08:20 +0100	[thread overview]
Message-ID: <bdc481b1-79b4-7f93-97da-8a4b01c41be0@lorke.de> (raw)

Hello!

The POSIX standard specifies for PS1 
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html


```
PS1

Each time an interactive shell is ready to read a command, the value of 
this variable shall be subjected to parameter expansion and written to 
standard error. The default value shall be "$ ". For users who have 
specific additional implementation-defined privileges, the default may 
be another, implementation-defined value. The shell shall replace each 
instance of the character '!' in PS1 with the history file number of the 
next command to be typed. Escaping the '!' with another '!' (that is, 
"!!" ) shall place the literal character '!' in the prompt. This volume 
of POSIX.1-2017 specifies the effects of the variable only for systems 
supporting the User Portability Utilities option.
```

Your manual pages say

```
PS1

The primary prompt string, which defaults to “$ ”, unless you are the 
superuser, in which case it defaults to “# ”.
```

I also tried it out, the exclamation mark functionality doesn't work.

Is this as intended?


Kind regards
Berthold Lorke

             reply	other threads:[~2022-01-25 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 21:08 Berthold Lorke [this message]
2022-01-26  6:57 ` PS1 is not implemented as specified in IEEE Std 1003.1-2017 Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bdc481b1-79b4-7f93-97da-8a4b01c41be0@lorke.de \
    --to=berthold@lorke.de \
    --cc=dash@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).