Skip to content
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 the clearBuffer action which is in 1.12 #478

Merged
merged 2 commits into from
Jan 24, 2022

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.

None yet

4 participants