From d412fbdcf3919a48c05b5ca4f5b369627b3a1710 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 25 Oct 2020 23:35:00 +0000 Subject: 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". --- Base/usr/share/man/man7/Shell-vars.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Base/usr') 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`. -- cgit v1.2.3