WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] buffer size in the terminal  (Read 4760 times)

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 801
[Solved] buffer size in the terminal
« on: November 01, 2020, 08:34:01 AM »
Hello Forum,

is there a way to increase the buffer size of the terminal window?......(so that more text can be typed into one single command
)

please, what method is there to do that?

thx

V
« Last Edit: November 05, 2020, 04:32:16 PM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: buffer size in the terminal
« Reply #1 on: November 01, 2020, 11:30:39 AM »
Code: [Select]
$ aterm -help
...
-sl number                        number of scrolled lines to save

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: buffer size in the terminal
« Reply #2 on: November 01, 2020, 11:38:47 AM »
Hi, guys!

@Juanito, seems, that vinceASPECT asked about the length of single command line, am I right, vinceASPECT? By the way, You haven't mentioned, You mean X terminal emulator or pure busybox console?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: buffer size in the terminal
« Reply #3 on: November 01, 2020, 12:00:01 PM »
Hi jazzbiker
... seems, that vinceASPECT asked about the length of single command line, ...
I think you are right.

It's possible the ASH shell might be involved here. Type this into a terminal (but don't hit enter yet):
Code: [Select]
echo xxxxxx | wc -cnow move the cursor back to the  x  characters. Hold down the  x  key until no more characters are produced. Now hit
enter. I got 1010 for an answer plus another 13 characters to either side of the Xs for 1023 total.

Now, in the same terminal, run:
Code: [Select]
bashand try the same thing again. I got over 3600 before I stopped trying.

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 801
Re: buffer size in the terminal
« Reply #4 on: November 01, 2020, 02:56:19 PM »
Hello forum,

yes, i mean the regular terminal that tcl offers.

Yes. it is the lengh of the command line and amount of chars it can take........ and then (enter key)

V

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: buffer size in the terminal
« Reply #5 on: November 01, 2020, 03:44:24 PM »
In busybox-1.29.3_config_nosuid I see
Code: [Select]
CONFIG_FEATURE_EDITING_MAX_LEN=1024@Rich, this correlates good with Your measurements.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: buffer size in the terminal
« Reply #6 on: November 01, 2020, 03:58:23 PM »
Hi jazzbiker
... @Rich, this correlates good with Your measurements.
Actually, it correlates exactly.
The maximum length is 1023 characters plus the  \0  required to terminate a string for a total of 1024.
By the way, nice find.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: buffer size in the terminal
« Reply #7 on: November 02, 2020, 05:18:10 AM »
Hi, vinceASPECT!

Try to rebuild busybox - it's not very compicated - with CONFIG_FEATURE_EDITING_MAX_LEN changed according to Your requirements. And then You need to remaster rootfs.gz, following the brilliant instructions by Curaga in Corebook. It is not harder than to drink a good cup of coffee, thanks TinyCore Creator and Team!

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 801
Re: buffer size in the terminal
« Reply #8 on: November 02, 2020, 06:09:38 AM »
right....

also going to look into possible more easy solutions. Another terminal for example.

tmux.....etc

thanks

v

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: buffer size in the terminal
« Reply #9 on: November 02, 2020, 07:24:15 AM »
Hi vinceASPECT
I don't think another terminal will solve your issue. I just tried with lxterminal and got the same result, 1023 characters.
Install  bash.tcz.  Then open a terminal and enter:
Code: [Select]
bashI suspect you will be able to enter at least 4095 characters.

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 801
Re: buffer size in the terminal
« Reply #10 on: November 02, 2020, 09:58:39 AM »
rich,

yes i did download and install bash....and i tried bash at the command line....

it didn't seem to do anything......hmmm?......

i will take a look at it again.

"tmux" had some issue about utf 8.........google said it's easily solvable but ofcourse all descriotions online refer to ubuntu.........on tcl there turned out to be deps missing for their silver bullet "utf 8 issue" solution.

thx

v

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: buffer size in the terminal
« Reply #11 on: November 02, 2020, 11:29:26 AM »
Hi vinceASPECT
... it didn't seem to do anything......hmmm?...... ...
You won't see it do anything. All you did was to replace the ASH shell with BASH. If you then type  exit  it will drop
you back into the the ASH shell. In both cases you just get back your command prompt. If you enter  exit  a second
time, it will close your terminal.

So the question remains, after you entered  bash , is the buffer large enough?

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 801
Re: buffer size in the terminal
« Reply #12 on: November 02, 2020, 01:58:12 PM »
ahh right rich...

well then, if what you say is correct then the buffer should be large enough for me.

it's just so that one can paste in multimedia content links and watch them....

will try it soon and report back...

many thanks

v


Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 801
Re: buffer size in the terminal
« Reply #13 on: November 05, 2020, 03:46:14 PM »
yes Rich, many thanks,

 you can mark this thread is solved.

 Buffer is large enough via bash.

thankyou indeed.

v

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: [Solved] buffer size in the terminal
« Reply #14 on: November 05, 2020, 04:06:15 PM »
Hi vinceASPECT
Marked as solved.
« Last Edit: November 05, 2020, 04:33:08 PM by Rich »