From a5272563567346ef1085d55c63934f41360d6784 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 11 May 2021 11:42:36 +0430 Subject: Shell: Add an option to autosave history every N ms ...and set it to 10 seconds by default. --- Base/usr/share/man/man7/Shell-vars.md | 7 +++++++ 1 file changed, 7 insertions(+) (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 2666621ec6..abe51b7344 100644 --- a/Base/usr/share/man/man7/Shell-vars.md +++ b/Base/usr/share/man/man7/Shell-vars.md @@ -33,6 +33,13 @@ Note: This variable is respected by every program using `Line::Editor`, e.g. [`j 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`. +`HISTORY_AUTOSAVE_TIME_MS` (environment) + +Setting this variable to a value `t` other than zero (0) will make the shell save the history to the history file every `t` milliseconds. +If `t` is not a non-negative integer, zero will be assumed. +Note that multiple shell instances will not interfere with each other if they are to save to the same history file, instead, the entries will all be merged together chronologically. +The default value for this option is set in `/etc/shellrc`. + ## Visual 1. Prompting -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0