WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: history command 150 lines limit  (Read 1475 times)

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 178
history command 150 lines limit
« 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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11588
Re: history command 150 lines limit
« Reply #1 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.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: history command 150 lines limit
« Reply #2 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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11588
Re: history command 150 lines limit
« Reply #3 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.

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 178
Re: history command 150 lines limit
« Reply #4 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.
« Last Edit: November 27, 2023, 06:39:30 PM by CardealRusso »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11588
Re: history command 150 lines limit
« Reply #5 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: history command 150 lines limit
« Reply #6 on: November 28, 2023, 02:51:29 AM »
Yeah changing that busybox config to say 1000 would be fine.
The only barriers that can stop you are the ones you create yourself.