
This is implemented in Line::Editor meaning not only the Shell will respect it, but also js, Debugger etc. Possible values are "ignorespace", "ignoredups" and "ignoreboth", as documented in Shell-vars(7), for now. The default value for the anon user (set in .shellrc) is "ignoreboth".
1.9 KiB
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
- 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
).
- History
HISTCONTROL
(environment)
The value of this variable is used to determine which entries are kept in the Shell's history, both regarding the current active session and when writing the history to disk on exit.
ignorespace
: Entries starting with one or more space characters are ignoredignoredups
: Consecutive duplicate entries are ignoredignoreboth
: The behaviour ofignorespace
andignoredups
is combined- If the variable is unset (this is the default) or has any other value than the above, no entries will be excluded from history.
Note: This variable is respected by every program using Line::Editor
, e.g. js
(1).
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
- 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 '%'.