Describe the bug
in macOS, in terminals uxterm, iterm2, terminal, and many more,
prompt of command "python3 -m pytgpt interactive"
would garble if terminal if less than 130 characters wide.
To Reproduce
Steps to reproduce the behavior:
On macOS, Run "pip3 install python-tgpt" to install python-tgpt.
Open another terminal window, 130 character or wider.
Open another terminal window, (much) less than 130 characters.
Run "python3 -m pytgpt interactive"
You would see garbled prompt, looking like:
"00:00:00-π»00:00:00-β‘0.0s]"
β°β>
Note that part "00:00:00-π»00:00:00-β‘0.0s]" is exactly 31 chars long when echo'ed,
and won't garble until terminal is less than 65 characters wide.
Expected behavior
If terminal on macOS is less than 130 characters wide and "python3 -m pytgpt interactive" is run on it within "bash", prompt of that command would fold on itself instead of properly line breaking, as it is on other systems!
Screenshots or Code snippets
If applicable, add screenshots or code snippets to help explain your problem.
Desktop (please complete the following information):
OS [e.g. Windows, Mac OS, Linux]: macOS 10.12.6
Python-tgpt version [v0.5.3]: 0.6.3
Binary config [x86, x64, x32]: x64 mach-o
Python version [If running from source]: 3.11.6 from MacPorts
Additional context
Add any other context about the problem here.
Workaround
It is caused by mishandled color codes by faulty-compiled Python version, and, maybe, something inside "pytgpt".
Run "pytgpt" with "-nc" flag, and that issue would hide.
Describe the bug in macOS, in terminals uxterm, iterm2, terminal, and many more, prompt of command "python3 -m pytgpt interactive" would garble if terminal if less than 130 characters wide.
To Reproduce Steps to reproduce the behavior:
Expected behavior If terminal on macOS is less than 130 characters wide and "python3 -m pytgpt interactive" is run on it within "bash", prompt of that command would fold on itself instead of properly line breaking, as it is on other systems!
Screenshots or Code snippets If applicable, add screenshots or code snippets to help explain your problem.
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
Workaround It is caused by mishandled color codes by faulty-compiled Python version, and, maybe, something inside "pytgpt". Run "pytgpt" with "-nc" flag, and that issue would hide.