concurrently
concurrently copied to clipboard
Feature request: option to disable console clearing
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?
My issue was "tsc -w" clearing the console and that was fixed in https://github.com/Microsoft/TypeScript/issues/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.
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 ^^
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