dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PS1 is not implemented as specified in IEEE Std 1003.1-2017
@ 2022-01-25 21:08 Berthold Lorke
  2022-01-26  6:57 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Berthold Lorke @ 2022-01-25 21:08 UTC (permalink / raw)
  To: dash

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PS1 is not implemented as specified in IEEE Std 1003.1-2017
  2022-01-25 21:08 PS1 is not implemented as specified in IEEE Std 1003.1-2017 Berthold Lorke
@ 2022-01-26  6:57 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-01-26  6:57 UTC (permalink / raw)
  To: Berthold Lorke; +Cc: dash

Berthold Lorke <berthold@lorke.de> wrote:
> 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.
> ```

Dash doesn't support the full set of UPU options and that includes
history.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-26  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 21:08 PS1 is not implemented as specified in IEEE Std 1003.1-2017 Berthold Lorke
2022-01-26  6:57 ` Herbert Xu

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).