Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: Vaguiner on November 27, 2023, 03:56:08 PM

Title: history command 150 lines limit
Post by: Vaguiner on November 27, 2023, 03:56:08 PM
Hello. Is it possible to increase the limit of the history command?

I tried changing "*.saveLines" in .Xdefaults, as indicated by some sites, but it was unsuccessful.
Title: Re: history command 150 lines limit
Post by: Rich on November 27, 2023, 05:03:35 PM
Hi CardealRusso
I seem to remember the default being 1000:
Code: [Select]
tc@E310:~$ grep save .Xdefaults
Aterm*saveLines: 1000
tc@E310:~$

By the way, changes made to this file will not affect any
existing terminals. Only terminals you start after saving
those changes.
Title: Re: history command 150 lines limit
Post by: jazzbiker on November 27, 2023, 05:14:18 PM
Hi Rich & CardealRusso,

150 is history size limit for busybox ash and it is configured at compile time, see  http://tinycorelinux.net/14.x/x86/release/src/busybox/busybox-1.36.0_config_nosuid
Code: [Select]
CONFIG_FEATURE_EDITING_HISTORY=150
Title: Re: history command 150 lines limit
Post by: Rich on November 27, 2023, 05:35:28 PM
Hi jazzbiker
I was thinking scroll back history. I guess maybe CardealRusso
meant recall history on the command line when hitting the up
arrow on the keyboard. If that's the case, maybe  bash.tcz  can
provide what he wants.
Title: Re: history command 150 lines limit
Post by: Vaguiner on November 27, 2023, 06:34:41 PM
meant recall history
Code: [Select]
CONFIG_FEATURE_EDITING_HISTORY=150

Hi, yes, i mean this.

But before trying bash, I noticed that
Code: [Select]
CONFIG_FEATURE_SH_HISTFILESIZE=yis present on http://tinycorelinux.net/14.x/x86/release/src/busybox/busybox-1.36.0_config_nosuid
According to the manual

Quote
   This option makes busybox shells to use $HISTFILESIZE variable
   to set shell history size. Note that its max value is capped
   by "History size" setting in library tuning section.

Does that mean I can just reduce it?

Apparently yes, it's only possible to reduce based on the limit.

It would be interesting if in the next editions of TinyCore the limit in CONFIG_FEATURE_EDITING_HISTORY was higher and applied the limit of 150 with export HISTFILESIZE=150 in .profile.
Title: Re: history command 150 lines limit
Post by: Rich on November 27, 2023, 09:38:26 PM
Hi CardealRusso
Here's something interesting. The  .ash_history file is not
limited to 150 lines:
Code: [Select]
tc@E310:~$ wc -l .ash_history
340 .ash_history
tc@E310:~$

The recall history is limited to 150 lines. After hitting the up
arrow key 150 times, the command displayed stopped changing.
Title: Re: history command 150 lines limit
Post by: curaga on November 28, 2023, 02:51:29 AM
Yeah changing that busybox config to say 1000 would be fine.