Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make Clear-Host clear the scrollback buffer too on all platforms #8606
The decision in #8603 to rely on
If there's consensus that the desired behavior is to consistently clear the screen and the scrollback buffer on all platforms, we have two options:
The original proposal below was written under the assumption that platform-dependent behavior was intended, and therefore suggested an opt-in mechanism.
Summary of the new feature/enhancement
Implement a switch named
That is, also clearing the scrollback buffer is invariably implied on Windows, whereas it is currently unavailable on Unix-like platforms.
Note: As before, this means that in the Windows console you do not have the option to selectively clear the current screen only, without erasing the scrollback buffer.
Proposed technical implementation details (optional)
@SteveL-MSFT @mklement0 Since
We can certainly implement this on Windows if desired, but I don't know that I've ever wanted it. YMMV.
@JamesWTruher @joeyaiello IIRC, the thrust of what we discussed in the committee meeting is that PowerShell would call
@BrucePay it could be argued (and I expect the corefx team to argue) that [Console]::Clear() has the correct behavior from their point of view today which is terminal specific. Personally, I prefer to have the scrollback buffer cleared as my typical use case is that I clear the screen so I can output a bunch of content and expect the buffer to only have the new content whereas retaining the buffer means I have to visually determine where the new content exists when I use my scroll wheel. Having
Amen to that.
So, from that perspective the best user experience would be to consistently clear the scrollback buffer too, on all platforms, as originally suggested in #8554.
Your decision was to rely on
So, yes, a CoreFx issue should be opened, but if the consensus is that we want buffer clearing on all platforms, we can certainly make that happen now without having to wait for
referenced this issue
Jan 10, 2019
Is there any reason why these changes wouldn't go into
I realize that #8609 already changes back to using
@iSazonov All of the changes so far have made within the function