cargo-compete
cargo-compete copied to clipboard
Output of `cargo compete open` is cleared in Windows Terminal
It seems that the terminal is cleared after printing message when using Windows Terminal.
How to reproduce
cargo new practice # platform=atcoder
cd practice
cargo compete open
Note: This works flawlessly in a terminal of VS Code.
Expected output:
$ cargo compete open
Opening https://atcoder.jp/contests/practice/tasks/practice_1
Opening https://atcoder.jp/contests/practice/tasks/practice_2
Environment
OS: Ubuntu 20.04.3 on Windows10 21H1 (WSL2) Windows Terminal: 1.10.2383.0 cargo-compete: 0.9.0
P.S.
I haven't checked detail yet, but echo 65001 > ~/.config/wslu/oemcp
solved this issue.
It seems that changing the encoding causes a terminal reset.
Ref:
https://github.com/wslutilities/wslu/issues/199
https://github.com/qryxip/cargo-compete/blob/8a148d94f61d6bc39bf65ce995476386546ec633/src/open.rs#L20