blob: cce5fc7457a412fb96760381895ad8a536853599 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
## Name
Shell Variables - Special local and environment variables used by the Shell
## Description
The Shell uses various variables to allow for customisations of certain behavioural or visual things.
Such variables can be changed or set by the user to tweak how the shell presents things.
## Behavioural
1. Output interpretations
`IFS` (local)
The value of this variable is used to join lists or split strings into lists, its default value is a newline (`\\n`).
2. History
`HISTFILE` (environment)
The value of this variable is used as the Shell's history file path, both for reading history at startup and writing history on exit.
Its default value is `~/.history`.
## Visual
1. Prompting
`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:
- `\\u` : the current username
- `\\h` : the current hostname
- `\\w` : a collapsed path (relative to home) to the current directory
- `\\p` : the string '$' (or '#' if the user is 'root')
Any other escaped character shall be ignored.
`PROMPT_EOL_MARK` (environment)
The value of this variable is used to denote the ends of partial lines (lines with no newline), its default value is '%'.
|