On Tue, Apr 24, 2012 at 10:40 PM, Dennis Groenen <[email protected]> wrote: > When CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is set to y, the histfile will get > cleared if the total amount of history lines is less than MAX_HISTORY. > Only if the histfile is not empty _and_ the amount of lines currently in > memory are equal to or greater than MAX_HISTORY, history saving will work as > expected with this feature enabled. > > Output from defconfig + CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y: > [dennis@i7-820qm ~/busybox/a]$ echo "foo" > ~/.ash_history > [dennis@i7-820qm ~/busybox/a]$ ./busybox ash > ~/busybox/a $ echo "bar" > /dev/null > ~/busybox/a $ exit > [dennis@i7-820qm ~/busybox/a]$ cat ~/.ash_history > [dennis@i7-820qm ~/busybox/a]$ > > Attached is a patch that resolves this issue. Output with the patch applied > and same config as above: > [dennis@i7-820qm ~/busybox/b]$ echo "foo" > ~/.ash_history > [dennis@i7-820qm ~/busybox/b]$ ./busybox ash > ~/busybox/b $ echo "bar" > /dev/null > ~/busybox/b $ exit > [dennis@i7-820qm ~/busybox/b]$ cat ~/.ash_history > foo > echo "bar" > /dev/null > exit > [dennis@i7-820qm ~/busybox/b]$
Applied, thanks! -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
