Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed [v36.50.68]: Prompt problem in TCMD with ConPTY

Jan
1,189
25
In v36.50.68 I have a prompt problem in TCMD tab with ConPTY:

First after loading TCMD it looks good ...

Screenshot 2026-06-30 165216.webp



But then after I entered a command it looks like this ...

Screenshot 2026-06-30 165240.webp


This is the problematic prompt:

Code:
$e[1;34m%USERNAME%$e[1;37m@$e[1;34m%USERDOMAIN%$s$e[1;33m$g$e[1;36m[$e[1;33m"$e[1;37m$p$e[1;33m"$e[1;36m]$_$e[1;37mADM:$s$e[0;37mN$s$e[1;36m$b$s$e[1;37mZeit:$s$e[0;37m$t$h$h$h$s$e[1;36m$b$s$e[0;37m$e[1;35m$$$s$e[0;37m

With prompt:
Code:
$p$g
I have no problem.

EDIT: It's because the prompt is over TWO LINES ...
 
Last edited:
My prompts always end with $e[0m. That says default foreground on default background. I believe defaults are set here.

1782832850847.webp


In TCC I say to use the defaults.

1782832939598.webp
 
Ty! Unfortunately the $e[0m doesn't help in that case ...

PS: Also, my prompt was ok before v36.50.68 ...

PPS: Scheme has no influence, colors are standard else ... and last but not least happens in ConTPY tab only (not in Conhost).
 
What you see happens here also. The unwanted color is 80/80/80; I'd guess ^e[1;40 (bri bla background?). It looks like a clear_to_EOL that's using a wrong color.

1782836010234.webp


After restarting TCMD it doesn't happen.

1782836322261.webp


Note that I am setting a theme by brute force in TCStart.btm. I think it's this one.

Code:
^e]4;0;rgb:0c/0c/0c^e\^e]4;1;rgb:be/2c/21^e\^e]4;2;rgb:3f/ae/3a^e\^e]4;3;rgb:be/9a/4a^e\^e]4;4;rgb:20/4d/be^e\^e]4;5;rgb:bb/54/be^e\^e]4;6;rgb:00/a7/b2^e\^e]4;7;rgb:be/be/be^e\^e]4;8;rgb:80/80/80^e\^e]4;9;rgb:ff/3e/30^e\^e]4;10;rgb:58/ea/51^e\^e]4;11;rgb:ff/d1/4e^e\^e]4;12;rgb:2f/6a/ff^e\^e]4;13;rgb:fc/74/ff^e\^e]4;14;rgb:00/e1/f0^e\^e]4;15;rgb:ff/ff/ff^e\^e]10;rgb:be/be/be^e\^e]11;rgb:0c/0c/0c^e\^e]12;rgb:ff/ff/ff^e\^e]17;rgb:92/a4/fd^e\^e[2J^e[3J^e[H
 
Yes, after restarting it's okay. BUT after I entered a command the problem appears again.

I also had set a theme by "brute force via tcstart - same problem.
 
Mildly interesting. This leads to corruption.

Code:
set prompt=`$e[1;33m$g$e[1;36m[$e[1;33m"$e[1;37m$p$e[1;33m"$e[1;36m]$_$e[1;37mADM:$s$e[0;37mN$s$e[1;36m$s$e[0m`

This doesn't:

Code:
set prompt=`$e[1;33m$g$e[1;36m[$e[1;33m"$e[1;37m$p$e[1;33m"$e[1;36m]$_$e[1;37mADM:$s$e[0;37mN$s$e[1;36m$e[0m`

The difference is $s (or not) before the final $e[0m
 

Attachments

  • 1782837610324.webp
    1782837610324.webp
    6 KB · Views: 7
Ahhh, thank you very much for investigating! I appreciate that!

Will test that later ...
 
Yes, same result here too. First corrupted, second not.

Unfortunately, a remove of $s in MY prompt above don't works ...
 
I have it!

IF I place a NON COLOR char at the end it works, regardless with or without $s before or not!

Means the following will work:

Code:
prompt $e[1;34m%USERNAME%$e[1;37m@$e[1;34m%USERDOMAIN%$s$e[1;33m$g$e[1;36m[$e[1;33m"$e[1;37m$p$e[1;33m"$e[1;36m]$_$e[1;37mADM:$s$e[0;37mN$s$e[1;36m$b$s$e[1;37mZeit:$s$e[0;37m$t$h$h$h$s$e[1;36m$b$s$e[0;37m$e[1;35m$$$s$e[0;37m$g$s[CODE\]
 
I wonder if that's why I had no problem with my prompt. I have $e[?25h at the end (cursor on).
 
• The PROMPT ends with a foreground color SGR while bold (1) is still active. When TCC then emits a 4x background code for the black input background, the bold flag pushed the background to gray 0x808080.
• Windows Terminal ignores bold for the background → renders black.
• Non-ConPTY tabs use real console cell attributes
• $p$g never turns on bold, and ending the prompt with a non-color sequence changes the trailing bold state — so neither reproduces the bold+background combination.

I have made a change for build 69 to match Windows Terminal's behavior and ignore bold for backgrounds.
 
Back
Top