mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:37:44 +00:00
Shell: Document all supported PROMPT flags
This commit is contained in:
parent
06debb1832
commit
15b675a804
1 changed files with 7 additions and 4 deletions
|
@ -40,10 +40,13 @@ Its default value is `~/.history`.
|
||||||
`PROMPT` (environment)
|
`PROMPT` (environment)
|
||||||
|
|
||||||
The value of this variable is used to generate a prompt, the following escape sequences can be used literally inside the value, and they would expand to their respective values:
|
The value of this variable is used to generate a prompt, the following escape sequences can be used literally inside the value, and they would expand to their respective values:
|
||||||
- `\\u` : the current username
|
- `\\a`: bell character (behavior depends on terminal)
|
||||||
- `\\h` : the current hostname
|
- `\\e`: escape character (`0x1b`)
|
||||||
- `\\w` : a collapsed path (relative to home) to the current directory
|
- `\\h`: the current hostname
|
||||||
- `\\p` : the string '$' (or '#' if the user is 'root')
|
- `\\p`: the string '$' (or '#' if the user is 'root')
|
||||||
|
- `\\u`: the current username
|
||||||
|
- `\\w`: a collapsed path (relative to home) to the current directory
|
||||||
|
- `\\X`: reset style (foreground and background color, etc)
|
||||||
|
|
||||||
Any other escaped character shall be ignored.
|
Any other escaped character shall be ignored.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue