-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add an option similar to -c
for resetting the terminal history
#141
Comments
|
In
On Windows it works only in an alternative buffer ( So I think to make it cross-platform and not damage terminal history before starting
Not sure about naming of the command line parameters though. With the buffers approach it might even make sense to just replace |
I like this! I like it enough that I think I want to make it default. How about this:
(In upstream, new behaviour is added as a new feature (non-breaking), and will be considered separately for addition to its cli flags.) |
I experimented with the alternate buffer using a simple wrapper shell script #!/bin/bash
trap "printf '\x1b[?1049l'" EXIT
printf '\x1b[?1049h'
cargo watch -s clear -s 'cargo check' However, there turns out to be a huge issue with alternate buffers: the scrolling doesn't work in the alternate buffer, so if the output of the watched command is larger than one terminal screen, then its beginning becomes completely lost. And implementing scrolling in So for now maybe it makes more sense to rather continue with the approach from #141 (comment):
|
Sounds good. I'll shelve the more advanced behaviour for the ever-upcoming cargo-overwatch :) |
Closing in favour of upstream issue: watchexec/watchexec#171. |
The
-c
option clears the terminal, but doesn't reset the historical buffer. So runningallows to scroll up to the previous checks, while
completely removes the history.
It is useful to have an ability to remove the history before each check if the output of
cargo check
doesn't fit into a single window. In that case scrolling up "as much us possible" always shows the beginning of the output of the most recent check, but not of past ones.The text was updated successfully, but these errors were encountered: