10BC0 Change `Clear-Host` back to using $RAWUI and `clear` to work over remoting by SteveL-MSFT · Pull Request #8609 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Jan 9, 2019

PR Summary

Based on feedback from @BrucePay [Console]::Clear() only works locally and need to revert to using $RAWUI to clear the screen on Windows and clear command to clear on non-Windows so it works over remoting

This reverts part of the change in #8603

PR Checklist

@iSazonov
Copy link
Collaborator
iSazonov commented Jan 9, 2019

Maybe simply fallback to RawUI:

try {
    [Console]::Clear
} catch {
    # Use RawUI
}

@SteveL-MSFT
Copy link
Member Author

@iSazonov there's interest to convert this to a C# cmdlet and extend it, so let's defer any enhancements to that effort

@iSazonov
Copy link
Collaborator

convert this to a C# cmdlet

@SteveL-MSFT Could you please open new Issue for this work? It seems this will be a breaking change and we will need PowerShell Committee approve.

@daxian-dbw daxian-dbw BBF8 added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jan 10, 2019
@SteveL-MSFT
Copy link
Member Author

@iSazonov it's implicitly part of #8606 since the way Clear-Host is currently implemented it's impossible to extend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0