diff options
author | Linus Groh <mail@linusgroh.de> | 2020-10-25 23:35:00 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-26 11:27:54 +0100 |
commit | d412fbdcf3919a48c05b5ca4f5b369627b3a1710 (patch) | |
tree | 5d7f7b4a7c9f2b4d15bdcbce7c2b3888696c4313 /Base/usr | |
parent | 4a4b1b1131f4622d7c83bd5a55961bcc56ec7943 (diff) | |
download | serenity-d412fbdcf3919a48c05b5ca4f5b369627b3a1710.zip |
Shell+LibLine: Support HISTCONTROL environment variable
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".
Diffstat (limited to 'Base/usr')
-rw-r--r-- | Base/usr/share/man/man7/Shell-vars.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Base/usr/share/man/man7/Shell-vars.md b/Base/usr/share/man/man7/Shell-vars.md index cce5fc7457..1107bed799 100644 --- a/Base/usr/share/man/man7/Shell-vars.md +++ b/Base/usr/share/man/man7/Shell-vars.md @@ -17,7 +17,18 @@ The value of this variable is used to join lists or split strings into lists, it 2. History -`HISTFILE` (environment) +`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 ignored +- `ignoredups`: Consecutive duplicate entries are ignored +- `ignoreboth`: The behaviour of `ignorespace` and `ignoredups` 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)](../man1/js.md). + +`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`. |