busybox: enable shell history size controls

Enable user control of history size both in memory and file size,
increasing the memory space to allow up to 2000 entries (or 256 on
SMALL_FLASH and LOW_MEMORY_FOOTPRINT devices).  This is a follow
on to the busybox ash history series in e23b37b2d9 and 0ab0a1d669.

Default remains as before (256 entries, both for memory and disk),
so as to avoid possible issues with increased footprint.

On both x86 and ath79, busybox binary size is unchanged across
several test builds.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/26482
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Eric Fahlgren authored and Robert Marko committed 2026-11-05 12:59:48 +01:00
1 parent ea6f658d92
commit a3ffc9af4e
3 files changed
+7 -4

No files matched your search

+3 -2
View File
@@ -255,7 +255,8 @@ config BUSYBOX_DEFAULT_FEATURE_EDITING_VI
default n
config BUSYBOX_DEFAULT_FEATURE_EDITING_HISTORY
int
default 256
default 256 if SMALL_FLASH || LOW_MEMORY_FOOTPRINT
default 2000
config BUSYBOX_DEFAULT_FEATURE_EDITING_SAVEHISTORY
bool
default y
@@ -3242,7 +3243,7 @@ config BUSYBOX_DEFAULT_FEATURE_SH_READ_FRAC
default n
config BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
bool
default n
default y
config BUSYBOX_DEFAULT_FEATURE_SH_EMBEDDED_SCRIPTS
bool
default n
+1 -1
View File
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=busybox
PKG_VERSION:=1.38.0
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_FLAGS:=essential
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -1,2 +1,4 @@
export HISTFILE=/tmp/.busybox_ash_history
# 256 is historical value; maximum is 2000 (256 on small builds).
export HISTFILESIZE=256
export HISTSIZE=256