diff options
Diffstat (limited to 'Base')
-rw-r--r-- | Base/usr/share/man/man1/Shell.md | 4 | ||||
-rw-r--r-- | Base/usr/share/man/man7/Shell-vars.md | 37 |
2 files changed, 41 insertions, 0 deletions
diff --git a/Base/usr/share/man/man1/Shell.md b/Base/usr/share/man/man1/Shell.md index 0705124d5b..1d480dac8c 100644 --- a/Base/usr/share/man/man1/Shell.md +++ b/Base/usr/share/man/man1/Shell.md @@ -38,3 +38,7 @@ Shell -c 'rm foo*' # Execute the contents of a file with some arguments Shell foo a b c ``` + +## See also + +* [`Shell-vars`(7)](../man7/Shell-vars.md) For details on local and environment variables used by the shell diff --git a/Base/usr/share/man/man7/Shell-vars.md b/Base/usr/share/man/man7/Shell-vars.md new file mode 100644 index 0000000000..d5a653eff0 --- /dev/null +++ b/Base/usr/share/man/man7/Shell-vars.md @@ -0,0 +1,37 @@ +## 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`). + + +## Visual + +2. 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 '%'. + |