add -e flag to print, to print the value to stderr (#5935)

* Refactor: make stdout write all and flush as generic function

* support print to stderr
This commit is contained in:
WindSoilder
2022-07-02 22:54:49 +08:00
committed by GitHub
parent be7f35246e
commit 84caf8859f
8 changed files with 64 additions and 16 deletions

View File

@ -216,7 +216,7 @@ impl Command for Watch {
match eval_result {
Ok(val) => {
val.print(engine_state, stack, false)?;
val.print(engine_state, stack, false, false)?;
}
Err(err) => {
let working_set = StateWorkingSet::new(engine_state);