canonical / canonical/craft-cli

When the Printer stops it needs to clean the last line if it was transient progress

Open
#125 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16
Forks
27
Avg merge
2d 1h
Merged PRs (30d)
12

Description

This will show both when stopping everything and when calling pause.

For example, check the two following codes:
```
emit.progress("Long text")
time.sleep(5)
with emit.pause():
print("inside")
emit.message("Done")
```

and

```
emit.progress("Long text")
time.sleep(5)
```

In the first case the text `inside` should overwrite "Long text", and in the second case whatever comes next because the process ends (e.g. the shell prompt) it should overwrite "Long text".

IOW, "Long text" should not remain in the screen after "the next thing comes" (because it's transient progress).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.