Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: option to disable console clearing #258

Open
emlai opened this issue Jan 26, 2021 · 3 comments
Open

Feature request: option to disable console clearing #258

emlai opened this issue Jan 26, 2021 · 3 comments

Comments

@emlai
Copy link

emlai commented Jan 26, 2021

Some commands such as CRA's "start" script clear the console (see facebook/create-react-app#2495), causing the previous output of the other commands to disappear when used with concurrently.

Would it be possible to add a command-line option to concurrently to disable the console clearing for all the child commands?

@priegger
Copy link

My issue was "tsc -w" clearing the console and that was fixed in microsoft/TypeScript#21295. In this ticket there are also some workarounds that might help, like dropping the control character that clears the screen using sed or awk.

@milahu
Copy link

milahu commented May 8, 2021

maybe we can mess with the "tty detection" of the programs
usually clearing is disabled when stdout goes to a pipe, at least in the linux world ^^

@ghivert
Copy link

ghivert commented Nov 14, 2022

Hi, after some investigations (I had the exact same problem with tsc -w), I feel like there's just the need to catch the character \x1Bc.

In the TypeScript compiler, we got the following line:

const clearScreen = () => {
  process.stdout.write("\x1Bc");
}

For sanity of concurrently, I think it would be better to have the non-clearing option opt-in, and letting the user disabling it if he wants. Otherwise it's really weird, you can pretty easily get some other messages cleared by your compiler, etc. (Which is my case for info, my frontend messages are cleaned by the TS compiler, and I couldn't see them properly.)

I can take a look and make a PR if that seems a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants