Welcome!

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

SignUp Now!

CLS in Windows Terminal

May
12,846
164
AFAIKT, TCC's "CLS /C" does not clear the whole consle screen buffer in Windows Terminal (as it does in Conhost). The same goes for my FCLS plugin (4CONSOLE).

This will clear the window and what Terminal calls the (scrollback) "history" (in other words, the whole buffer) and leave the new prompt at row 1.

Code:
echos ^e[2J^e[3J^e[H

In plugin (C) language, that's

Code:
Printf(L"\x1b[2J\x1b[3J\x1b[H");
 
Last edited:
No doubt due to the fact that Windows Terminal uses OpenConsole.exe instead of ConHost.exe, although from what I have read, OpenConsole is supposed to be backward compatible.

Joe
 
No doubt due to the fact that Windows Terminal uses OpenConsole.exe instead of ConHost.exe, although from what I have read, OpenConsole is supposed to be backward compatible.

Joe
I posted a query on GitHub and just got a response from D. Howett. He summarized which parts of the Win32 console API should ... and won't work with Terminal. Some things, it would seem, are just out of the question.

This LINK should take you to his response. It's quite interesting (a bit of the preceding stuff, too).

Well, I've made friends with Windows Terminal. I have no need for it (if I did, I'd be using TCMD) but it's fun to play with it.

Funny ... the first time I saw a horizontally-split window with two black DOS-boxes and green "v:\>" prompts I got goose-bumps and (really) thought of DesqView (for the first time in ~30 years).
 
Funny ... the first time I saw a horizontally-split window with two black DOS-boxes and green "v:\>" prompts I got goose-bumps and (really) thought of DesqView (for the first time in ~30 years).
Look what's still on my bookshelf...

20200717_152409.jpg
 
Back
Top