package/busybox: save shell history only on exit

Both busybox.config and busybox-minimal.config set
CONFIG_FEATURE_EDITING_SAVEHISTORY=y. This causes the Busybox shell to
write the history file after every command, which can be a problem on
storage with limited write cycles (e.g. eMMC).

Set CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y to change behavior to write
the history file only on exit, which reduces writes without losing the
history feature.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fiona Klute (WIWA)
2025-03-03 13:14:49 +01:00
committed by Thomas Petazzoni
parent cca8d68461
commit 3ffdcc5b9d
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ CONFIG_FEATURE_EDITING_MAX_LEN=1024
CONFIG_FEATURE_EDITING_VI=y
CONFIG_FEATURE_EDITING_HISTORY=999
CONFIG_FEATURE_EDITING_SAVEHISTORY=y
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set

View File

@@ -108,7 +108,7 @@ CONFIG_FEATURE_EDITING_MAX_LEN=1024
CONFIG_FEATURE_EDITING_VI=y
CONFIG_FEATURE_EDITING_HISTORY=999
CONFIG_FEATURE_EDITING_SAVEHISTORY=y
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set