Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch: clears terminal before entering loop #227

Merged
merged 1 commit into from
Nov 9, 2019

Conversation

workingjubilee
Copy link
Contributor

Fixes #146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.
Copy link
Member

@shadows-withal shadows-withal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shadows-withal
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 9, 2019

📌 Commit 83be517 has been approved by fmoko

bors added a commit that referenced this pull request Nov 9, 2019
watch: clears terminal before entering loop

Fixes #146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.
@bors
Copy link
Contributor

bors commented Nov 9, 2019

⌛ Testing commit 83be517 with merge fea8141...

@bors
Copy link
Contributor

bors commented Nov 9, 2019

☀️ Test successful - checks-travis
Approved by: fmoko
Pushing fea8141 to master...

@bors bors merged commit 83be517 into rust-lang:master Nov 9, 2019
bors added a commit that referenced this pull request Nov 9, 2019
improvement(watch): clear screen before each `verify()`

Closes #146
It seems to me that #227 wasn't really fixing the issue.
pedantic79 pushed a commit to pedantic79/rustlings that referenced this pull request Apr 11, 2020
…=fmoko

watch: clears terminal before entering loop

Fixes rust-lang#146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.
pedantic79 pushed a commit to pedantic79/rustlings that referenced this pull request Apr 11, 2020
improvement(watch): clear screen before each `verify()`

Closes rust-lang#146
It seems to me that rust-lang#227 wasn't really fixing the issue.
ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
…=fmoko

watch: clears terminal before entering loop

Fixes rust-lang#146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.
ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
improvement(watch): clear screen before each `verify()`

Closes rust-lang#146
It seems to me that rust-lang#227 wasn't really fixing the issue.
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
…=fmoko

watch: clears terminal before entering loop

Fixes rust-lang#146

If someone is sliding in and out of "watch" mode, it can make it hard
to tell which error messages are still relevant. This patch resolves
that by clearing the terminal entirely before entering watch's loop.

Note that the escape character is chosen for compatibility reasons, because different shells/terminals can change which commands they accept or have installed, betting on what other commands are in use to collect data seems risky, and just expecting them to implement ANSI escape code sequences is more reliable. This seems especially true since Windows is seeking more UNIX compatibility in its terminals going forward, even though it doesn't implement the POSIX standard per se.
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
improvement(watch): clear screen before each `verify()`

Closes rust-lang#146
It seems to me that rust-lang#227 wasn't really fixing the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustlings watch Should clear the shell.
3 participants