Add the clearBuffer action which is in 1.12#478
Merged
cinnamon-msft merged 2 commits intorelease-1.13from Jan 24, 2022
Merged
Conversation
As in microsoft/terminal#10906 ### Clear Buffer ([Preview](https://aka.ms/terminal-preview)) This action can be used to manually clear the Terminal buffer. This is useful for scenarios where you're not sitting at a command-line shell prompt and can't easily run `Clear-Host`/`cls`/`clear`. **Command name:** `clearBuffer` **Default bindings:** ```json { "command": { "action": "clearBuffer", "clear": "all" } }, ``` #### Actions | Name | Necessity | Accepts | Description | | ---- | --------- | ------- | ----------- | | `clear` | Optional | `"screen"`, `"scrollback"`, `"all"` | What part of the screen to clear. <ul><li>`"screen"`: Clear the terminal viewport content. Leaves the scrollback untouched. Moves the cursor row to the top of the viewport (unmodified).</li><li>`"scrollback"`: Clear the scrollback. Leaves the viewport untouched.</li><li>`"all"` (_default_): Clear the scrollback and the visible viewport. Moves the cursor row to the top of the viewport. </li></ul> | | `relative` | Optional | Boolean | If true, then adjust the current opacity by the given `opacity` parameter. If false, set the opacity to exactly that value. | > [!IMPORTANT] > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
|
Docs Build status updates of commit b11fecd: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
|
Docs Build status updates of commit b11fecd: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As in microsoft/terminal#10906
Clear Buffer (Preview)
This action can be used to manually clear the Terminal buffer. This is useful for scenarios where you're not sitting at a command-line shell prompt and can't easily run
Clear-Host/cls/clear.Command name:
clearBufferDefault bindings:
{ "command": { "action": "clearBuffer", "clear": "all" } },Actions
clear"screen","scrollback","all""screen": Clear the terminal viewport content. Leaves the scrollback untouched. Moves the cursor row to the top of the viewport (unmodified)."scrollback": Clear the scrollback. Leaves the viewport untouched."all"(default): Clear the scrollback and the visible viewport. Moves the cursor row to the top of the viewport.relativeopacityparameter. If false, set the opacity to exactly that value.Important
This feature is only available in Windows Terminal Preview.