Description
TypeScript Version: 3.4.0-dev.20190208
Search Terms: terminal, watcher
Issue
I'm using linux, and I have a custom terminal theme (I'm using powerlevel-9k). To make it look more pleasing, I tuned the terminal colors, but I did that through tput commands in my .zshrc:
tput initc 0 172 196 200
tput initc 1 800 210 100
tput initc 2 220 560 220
tput initc 3 800 460 180
tput initc 4 350 530 670
tput initc 5 630 380 470
tput initc 6 470 710 760
tput initc 7 810 810 810
tput initc 8 570 570 570
tput initc 9 1000 280 200
tput initc 10 720 710 0
tput initc 11 1000 780 430
tput initc 12 530 760 1000
tput initc 13 820 820 1000
tput initc 14 440 760 830
tput initc 15 910 910 910
I am loosing these customizations if I run typescript's compiler tsc in watch mode (tsc -w) and exit it through ctrl-c. When returning to the shell after that, the colors are the original ones, as if the tput commands were never executed. So it seems tsc -w
is sending a too drastic reset command to the terminal, which does not only erase tsc
's output but can also discard some user's customizations to their terminal.
Notice that the issue occurs with the xterm
and kitty
terminals, but NOT with gnome-terminal
, which seems to be a gnome-terminal
or vte
bug (see kitty bug and vte bug).
Expected behavior:
Running and exiting tsc -w
shouldn't discard my color customizations to my terminal.
Actual behavior:
Running and exiting tsc -w
discards my color customizations to my terminal.
Note that when searching if that bug was already reported, I stumbled upon the --preserveWatchOutput
flag and I can confirm that when this flag is enabled, the issue is NOT present.