set ::TclReadLine::PROMPT {\033\[36mtclsh-[info patchlevel]\033\[0m \[\033\[34m[file tail [pwd]\033\[0m]\]\033\[31m % \033\[0m}
It's very easy to test for long commands, I just type an 'f' character until the command wraps to the next line. The line wraps too early, it doesn't make it to the end of my terminal, and the cursor position is not where new characters are being displayed. Adding a newline seems to make things even more unpredictable.
Using the non-colored version:
set ::TclReadLine::PROMPT {tclsh[info patchlevel] \[[pwd]\]% }
The wrapping and cursor position behavior is fine. Newlines are handled fine with the uncolored prompt.
I feel like it's probably a pretty easy fix but I can't seem to figure it out.
I'm using this prompt:
It's very easy to test for long commands, I just type an 'f' character until the command wraps to the next line. The line wraps too early, it doesn't make it to the end of my terminal, and the cursor position is not where new characters are being displayed. Adding a newline seems to make things even more unpredictable.
Using the non-colored version:
The wrapping and cursor position behavior is fine. Newlines are handled fine with the uncolored prompt.
I feel like it's probably a pretty easy fix but I can't seem to figure it out.