diff options
author | Denys Vlasenko | 2011-03-31 13:16:52 +0200 |
---|---|---|
committer | Denys Vlasenko | 2011-03-31 13:16:52 +0200 |
commit | 2c4de5b045a79db73052d5b865474a00c9a87e99 (patch) | |
tree | 12a5c2c7a0685ab1674e6b07959688a3470359fd /shell/hush.c | |
parent | a439fa93f64e6eb34f0633d00d203b4267d58521 (diff) | |
download | busybox-2c4de5b045a79db73052d5b865474a00c9a87e99.zip busybox-2c4de5b045a79db73052d5b865474a00c9a87e99.tar.gz |
ash,hush: optional support for $HISTFILESIZE.
Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com)
function old new delta
size_from_HISTFILESIZE - 44 +44
hush_main 998 1025 +27
ash_main 1348 1374 +26
read_line_input 3361 3372 +11
new_line_input_t 17 24 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index e698e6c..d3e957c 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -7614,6 +7614,10 @@ int hush_main(int argc, char **argv) //set_local_var(xasprintf("HISTFILE=%s", ...)); } } +# if ENABLE_FEATURE_SH_HISTFILESIZE + hp = get_local_var_value("HISTFILESIZE"); + G.line_input_state->max_history = size_from_HISTFILESIZE(hp); +# endif } # endif #endif |