telminal icon indicating copy to clipboard operation
telminal copied to clipboard

When the text is too long, replace it with a txt file

Open Frederisk opened this issue 1 year ago • 3 comments

Sometimes the output of certain commands is too long, which can cause text to be truncated in the message. Such as node -h.

As a solution, I think a txt file can be returned instead of the message when the text is too long.🤔

Frederisk avatar Feb 05 '23 09:02 Frederisk

Did you tried HTML button ? that gives you a full formatted output. I think having a text preview even truncated is better than nothing 🤔

image

image

fristhon avatar Feb 05 '23 09:02 fristhon

There are still some issues with the HTML output, such as the font scale being too small to read on mobile phones. And seemingly too long text will be truncated, such as ffmpeg -h full. Or maybe it's a good idea to provide a button to get the txt file as well as HTML?

Also, currently HTML files don't seem to preview properly in safari on iOS, I'm investigating this issue and will open it in another issue.

Frederisk avatar Feb 06 '23 03:02 Frederisk

For this kind of commands user can pipe the output into the file and download that (.txt) file. ffmpeg -h full > out.txt !get out.txt

If you have a better and easier implementation to fix this or solve the scale problem, we can try it. maybe upgrading 'xterm.js' styles make a difference, not sure about that.

Also, I didn't know about Safari problem. Apple always has own special issues! I will be happy to hear about it in another issue.

fristhon avatar Feb 07 '23 10:02 fristhon