Skip to content

Add the clearBuffer action which is in 1.12#478

Merged
cinnamon-msft merged 2 commits intorelease-1.13from
dev/migrie/clearBuffer
Jan 24, 2022
Merged

Add the clearBuffer action which is in 1.12#478
cinnamon-msft merged 2 commits intorelease-1.13from
dev/migrie/clearBuffer

Conversation

@zadjii-msft
Copy link
Contributor

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: clearBuffer

Default bindings:

{ "command": { "action": "clearBuffer", "clear": "all" } },

Actions

Name Necessity Accepts Description
clear Optional "screen", "scrollback", "all" What part of the screen to clear.
  • "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.
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.

  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).
@opbld32
Copy link

opbld32 commented Jan 7, 2022

Docs Build status updates of commit b11fecd:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/actions.md ✅Succeeded View

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:

@cinnamon-msft cinnamon-msft changed the base branch from main to release-1.13 January 20, 2022 23:11
@opbld31
Copy link

opbld31 commented Jan 20, 2022

Docs Build status updates of commit b11fecd:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/actions.md ✅Succeeded View

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:

@cinnamon-msft cinnamon-msft merged commit 7c3dfee into release-1.13 Jan 24, 2022
@cinnamon-msft cinnamon-msft deleted the dev/migrie/clearBuffer branch January 24, 2022 18:26
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.

4 participants