aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Config.src10
-rw-r--r--libbb/lineedit.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/libbb/Config.src b/libbb/Config.src
index b980f19a9..61b4601d6 100644
--- a/libbb/Config.src
+++ b/libbb/Config.src
@@ -188,6 +188,16 @@ config FEATURE_EDITING_HISTORY
188 help 188 help
189 Specify command history size (0 - disable). 189 Specify command history size (0 - disable).
190 190
191config FEATURE_EDITING_HISTORY_DEFAULT
192 int "Default history size"
193 range 0 FEATURE_EDITING_HISTORY
194 default 255
195 depends on PLATFORM_MINGW32 && FEATURE_EDITING && FEATURE_SH_HISTFILESIZE
196 help
197 Specify default command history size. This may be smaller than
198 FEATURE_EDITING_HISTORY, in which case the user may increase
199 the history size by setting HISTFILESIZE.
200
191config FEATURE_EDITING_SAVEHISTORY 201config FEATURE_EDITING_SAVEHISTORY
192 bool "History saving" 202 bool "History saving"
193 default y 203 default y
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 1a095b657..811e3e475 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1585,8 +1585,8 @@ line_input_t* FAST_FUNC new_line_input_t(int flags)
1585 1585
1586unsigned FAST_FUNC size_from_HISTFILESIZE(const char *hp) 1586unsigned FAST_FUNC size_from_HISTFILESIZE(const char *hp)
1587{ 1587{
1588# if ENABLE_PLATFORM_MINGW32 && MAX_HISTORY > 511 1588# if ENABLE_PLATFORM_MINGW32 && DEFAULT_HISTORY > 0 && DEFAULT_HISTORY <= MAX_HISTORY
1589 int size = 384; 1589 int size = DEFAULT_HISTORY;
1590# else 1590# else
1591 int size = MAX_HISTORY; 1591 int size = MAX_HISTORY;
1592# endif 1592# endif