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

Merge main into live #555

Merged
merged 59 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8871b3a
Update dynamic-profiles.md (#438)
shgogna Dec 13, 2021
8527dba
Update VS version info in 3rd party (#462)
mattwojo Dec 13, 2021
e5ac3e1
Update custom prompt tutorial w latest OMP steps (#467)
mattwojo Dec 22, 2021
0a19d0b
Add themes link
mattwojo Dec 22, 2021
ddd8432
Bulk fix - Removing .localizationpriority (#469)
v-alje Dec 23, 2021
141f84e
Testing image (#474)
JasonWHowell Jan 4, 2022
f05111c
Include note on how to save the directory of a pane (#473)
Rosefield Jan 4, 2022
66afc3d
Add decimal value note for pane size
mattwojo Jan 6, 2022
037876d
Remove VS PowerShell and CMD for 3rd party
mattwojo Jan 7, 2022
ca7677a
Add faq for psreadline
mattwojo Jan 7, 2022
e1116e2
Merge branch 'main' of https://github.com/MicrosoftDocs/terminal
mattwojo Jan 7, 2022
cc08ae4
Fix formatting
mattwojo Jan 7, 2022
7c6b1fb
Remove space before code block
mattwojo Jan 7, 2022
77f489e
Remove code block
mattwojo Jan 7, 2022
82364b6
Fix link
mattwojo Jan 7, 2022
be705cf
Merge branch 'live' into main
mattwojo Jan 8, 2022
7cd48bc
startingDirectory path for WSL no longer requires prefix
mattwojo Jan 8, 2022
9d476b9
Update custom-prompt-setup.md (#482)
sanamhub Jan 12, 2022
2ccc36c
style: fix typo in new-tab-same-directory.md (#486)
Haltarys Jan 20, 2022
db0bb84
Updated based on pull 9270 in Terminal repo
mattwojo Jan 20, 2022
c0291c6
GUID generation for dynamic fragments (#320) (#460)
Okeanos Jan 20, 2022
8fe25d1
FIx to close https://github.com/MicrosoftDocs/terminal/issues/484
mattwojo Jan 20, 2022
fdd2685
Typo
mattwojo Jan 20, 2022
223fd23
Add UTF8 note
mattwojo Jan 21, 2022
c7fafdf
Fix note formatting
mattwojo Jan 21, 2022
51ca48b
Merge release-1.13 into main (#492)
cinnamon-msft Feb 3, 2022
fc0162d
Merge branch 'live' into main
cinnamon-msft Feb 3, 2022
ea2e3c6
Minor intro rewrite (#487)
mattwojo Feb 3, 2022
9d401a6
typo fix
mattwojo Feb 3, 2022
fd34457
Remove start from PowerShell commands
cinnamon-msft Feb 3, 2022
7c20910
winget link fix
mattwojo Feb 8, 2022
269670c
Link fix
mattwojo Feb 8, 2022
dfe55d0
link fix
mattwojo Feb 8, 2022
a7a0eca
link fix
mattwojo Feb 8, 2022
42d9b0d
Add `bellsound` profile setting (#508)
cinnamon-msft Feb 16, 2022
0509e60
Fix typos found by codespell (#501)
DimitriPapadopoulos Feb 16, 2022
015f800
Change step to view themes on documentation site (#505)
wsmelton Feb 16, 2022
7e39a2e
Set ms.topic: faq where YamlMime:FAQ (#506)
alexbuckgit Feb 16, 2022
f1ef080
Merge branch 'live' into main
cinnamon-msft Feb 16, 2022
33241e7
Fix pkgmgr link
mattwojo Feb 16, 2022
9f7b431
troubleshooting: clarify WSL `startingDirectory` entry (#516)
phil-blain Mar 8, 2022
4941a40
Remove version specifics relating to WSL paths
mattwojo Mar 8, 2022
bbd9684
New tab same directory (zsh) (#513)
AdrienClairembault Mar 8, 2022
455fecd
Add acrylic issues to troubleshooting (#518)
mattwojo Mar 8, 2022
20c9e79
command-palette: simplify example for iterable commands (#511)
phil-blain Mar 8, 2022
371d016
Move iterable commands gif lower down
cinnamon-msft Mar 8, 2022
5319bb4
Quoted the env-var for `setx PROMPT` (#502)
TBBle Mar 8, 2022
3ca01c1
Updated --title documentation to specify behavior for panes (#500)
joshuacookdev Mar 8, 2022
675b72a
push (#520)
Aaron-Junker Mar 31, 2022
cf43c23
json-fragment-extensions: output GUIDs in "registry format" (#515)
phil-blain Apr 8, 2022
682ad65
fix(powerline): adjust docs to reflect oh-my-posh changes (#534)
JanDeDobbeleer May 22, 2022
0781e4c
Merge release-1.14 into main (#544)
cinnamon-msft May 23, 2022
26c486f
Fix link
cinnamon-msft May 23, 2022
85fd8c1
Merge branch 'live' into main
cinnamon-msft May 23, 2022
b80f3cf
Add package id command for winget (#548)
mattwojo Jun 9, 2022
ed67430
Merge branch 'live' into main
mattwojo Jun 9, 2022
51425a8
clarify (#551)
zadjii-msft Jul 6, 2022
4187581
Merge release-1.15 into main (#554)
cinnamon-msft Jul 6, 2022
d83b79a
Add selection to TOC
cinnamon-msft Jul 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions TerminalDocs/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
href: command-palette.md
- name: Search
href: search.md
- name: Selection
href: selection.md
- name: Panes
href: panes.md
- name: Dynamic profiles
Expand Down
121 changes: 118 additions & 3 deletions TerminalDocs/customize-settings/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal Actions
description: Learn how to create custom actions for Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 05/24/2022
ms.date: 07/06/2022
ms.topic: how-to
---

Expand Down Expand Up @@ -823,7 +823,8 @@ This copies the selected terminal content to your clipboard. If no selection exi

// In defaults.json
{ "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+shift+c" },
{ "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+insert" }
{ "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+insert" },
{ "command": { "action": "copy", "singleLine": false }, "keys": "enter" }
```

#### Parameters
Expand All @@ -850,7 +851,7 @@ This inserts the content that was copied onto the clipboard.
{ "command": "paste", "keys": "shift+insert" }
```

### Select all ([Preview](https://aka.ms/terminal-preview))
### Select all

This selects all of the content in the text buffer.

Expand All @@ -862,6 +863,48 @@ This selects all of the content in the text buffer.
{ "command": "selectAll", "keys": "ctrl+shift+a" }
```

### Mark mode ([Preview](https://aka.ms/terminal-preview))

This toggles mark mode. Mark mode is a mode where you can use the keyboard to create a selection at the cursor's position in the terminal.

**Command name:** `markMode`

**Default bindings:**

```json
{ "command": "markMode", "keys": "ctrl+shift+m" },
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Switch selection marker ([Preview](https://aka.ms/terminal-preview))

When modifying a selection using the keyboard, you are moving one end of the selection around. You can use this action to switch to the other selection marker.

**Command name:** `switchSelectionEndpoint`

**Default bindings:**

```json
{ "command": "switchSelectionEndpoint" },
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Toggle block selection ([Preview](https://aka.ms/terminal-preview))

Makes the exisiting selection a block selection, meaning that the selected area is a rectangle, as opposed to wrapping to the beginning and end of each line.

**Command name:** `toggleBlockSelection`

**Default bindings:**

```json
{ "command": "toggleBlockSelection" },
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

Expand Down Expand Up @@ -1068,6 +1111,78 @@ Changes the active color scheme.
{ "command": { "action": "setColorScheme", "colorScheme": "Campbell" }, "keys": "" }
```

### Experimental add scroll mark ([Preview](https://aka.ms/terminal-preview))

Adds a scroll mark to the text buffer. If there's a selection, the mark is placed at the selection, otherwise it's placed at the cursor row. This is an experimental feature, and its continued existence is not guaranteed.

**Command name:** `addMark`

#### Parameters

| Name | Necessity | Accepts | Description |
| ---- | --------- | ------- | ----------- |
| `color` | Optional | String, in hex format: `"#rgb"` or `"#rrggbb"` | The color of the mark. |

**Example binding:**

```json
{ "command": { "action": "addMark", "color": "#ff00ff" } }
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Experimental scroll to mark ([Preview](https://aka.ms/terminal-preview))

Scrolls to the scroll mark in the given direction. This is an experimental feature, and its continued existence is not guaranteed.

**Command name:** `scrollToMark`

#### Parameters

| Name | Necessity | Accepts | Description |
| ---- | --------- | ------- | ----------- |
| `direction` | Required | `"first"`, `"previous"`, `"next"`, `"last"` | The direction in which to scroll. |

**Example binding:**

```json
{ "command": { "action": "scrollToMark", "direction": "previous" } }
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Experimental clear mark ([Preview](https://aka.ms/terminal-preview))

Clears scroll mark at the current position, either at a selection if there is one or at the cursor position. This is an experimental feature, and its continued existence is not guaranteed.

**Command name:** `clearMark`

**Example binding:**

```json
{ "command": { "action": "clearMark" } }
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Experimental clear all marks ([Preview](https://aka.ms/terminal-preview))

Clears all scroll marks in the text buffer. This is an experimental feature, and its continued existence is not guaranteed.

**Command name:** `clearAllMarks`

**Example binding:**

```json
{ "command": { "action": "clearAllMarks" } }
```

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

<br />

___
Expand Down
7 changes: 2 additions & 5 deletions TerminalDocs/customize-settings/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal Appearance Settings
description: Learn how to customize appearance settings within Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 05/24/2022
ms.date: 07/06/2022
ms.topic: how-to
---

Expand Down Expand Up @@ -223,7 +223,7 @@ When this is set to `true`, closing a window with multiple tabs open _will_ requ

___

## Use a background image for the entire window ([Preview](https://aka.ms/terminal-preview))
## Use a background image for the entire window

When set to `true`, the background image for the currently focused profile is expanded to encompass the entire window, beneath other panes. This is an experimental feature, and its continued existence is not guaranteed.

Expand All @@ -234,6 +234,3 @@ When set to `true`, the background image for the currently focused profile is ex
**Accepts:** `true`, `false`

**Default value:** `false`

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
39 changes: 34 additions & 5 deletions TerminalDocs/customize-settings/profile-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal Advanced Profile Settings
description: Learn how to customize the advanced profile settings within Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 05/24/2022
ms.date: 07/06/2022
ms.topic: how-to
---

Expand Down Expand Up @@ -149,6 +149,38 @@ When `bellStyle` is set to `"all"` or `"audible"`, this allows you to choose the

___

## Scroll marks ([Preview](https://aka.ms/terminal-preview))

The following settings modify how scroll marks behave in Windows Terminal.

### Experimental automatically add scroll marks ([Preview](https://aka.ms/terminal-preview))

Automatically marks prompts when set to `true`. This is an experimental feature, and its continued existence is not guaranteed.

**Property name:** `experimental.autoMarkPrompts`

**Necessity:** Optional

**Accepts:** `true`, `false`

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Experimental show marks on scrollbar ([Preview](https://aka.ms/terminal-preview))

Displays marks on the scrollbar when set to `true`. This is an experimental feature, and its continued existence is not guaranteed.

**Property name:** `experimental.showMarksOnScrollbar`

**Necessity:** Optional

**Accepts:** `true`, `false`

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

___

## Experimental text rendering engine

Enables use of the experimental text rendering engine for the profile. This is an experimental feature and its continued existence is not guaranteed. A new instance of the profile needs to be opened in order for this setting to take effect.
Expand All @@ -165,7 +197,7 @@ Enables use of the experimental text rendering engine for the profile. This is a

___

## VT passthrough mode ([Preview](https://aka.ms/terminal-preview))
## VT passthrough mode

When set to true, directs the PTY for this connection to use pass-through mode instead of the original Conhost PTY simulation engine. This is an experimental feature, and its continued existence is not guaranteed.

Expand All @@ -177,9 +209,6 @@ When set to true, directs the PTY for this connection to use pass-through mode i

**Default value:** `false`

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

<br />

___
Expand Down
Binary file added TerminalDocs/images/oh-my-posh-winget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions TerminalDocs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ To try the latest preview features, you may also want to [install Windows Termin
> [!NOTE]
> If you don't have access to the Microsoft Store, the builds are published on the **[GitHub releases page](https://github.com/microsoft/terminal/releases)**. If you install from GitHub, Windows Terminal will not automatically update with new versions. For additional installation options using a package manager (winget, chocolatey, scoop), see the **[Windows Terminal product repo](https://github.com/microsoft/terminal#other-install-methods)**.

## Set your default terminal application ([Preview](https://aka.ms/terminal-preview))
## Set your default terminal application

> [!IMPORTANT]
> This feature is only available in [Windows 11](https://www.microsoft.com/windows/).

To open any command line application with Windows Terminal, set it as your default terminal application.

Expand All @@ -28,9 +31,6 @@ To open any command line application with Windows Terminal, set it as your defau

![Screenshot of Windows Terminal Startup default in Settings UI](./images/settings-default-shell.png)

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

## Set your default terminal profile

After installation, when you open Windows Terminal, it will start with the [PowerShell](/powershell) command line as the default profile in the open tab.
Expand Down
85 changes: 85 additions & 0 deletions TerminalDocs/selection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Selection
description: Learn how to select text in Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 07/06/2022
ms.topic: how-to
---

# Selecting text in Windows Terminal

Selecting text is straightforward in Windows Terminal, but there are a lot of additional features in this space that make it even better.

## Mouse support

Left-click and drag your mouse to create a selection. Double-click expands the selection by word, whereas triple-click expands by line.

If you are holding the <kbd>Alt</kbd> key, you will create a block selection (as opposed to a line selection). Block selections create a rectangular region that do not wrap to the end of the line.

If you are holding the <kbd>Shift</kbd> key, you can explicitly expand the selection to a specific point on the terminal without the need to click and drag.

Once you have a selection present, you have a few options. A single left-click will clear your selection. If you actually want to use it, you can right-click to copy the selected text to your clipboard and clear the selection. If you right-click again, the contents of your clipboard will then be pasted into the terminal.

> [!NOTE]
> Windows Terminal supports mouse input in Windows Subsystem for Linux (WSL) applications as well as Windows applications that use virtual terminal (VT) input. This means applications such as [tmux](https://github.com/tmux/tmux/wiki) and [Midnight Commander](https://www.linuxhelp.com/how-to-install-midnight-commander-in-linux) will recognize when you select items in the terminal window. If an application is in mouse mode, you can hold down <kbd>Shift</kbd> to make a selection instead of sending VT input.

## Keyboard support

You can create a selection by using the `selectAll` or `markMode` actions. The `selectAll` action selects all the text in the buffer. The `markMode` action toggles a special mode where a selection is created at the cursor's position in the terminal. When in mark mode, you can use the following non-configurable key bindings to move the cursor around:

| Key binding | Result |
| ----------- | ------ |
| Arrow keys | Move by character in the specified direction |
| <kbd>Ctrl</kbd> + <kbd>Left</kbd> | Move to the beginning of the previous or existing word |
| <kbd>Ctrl</kbd> + <kbd>Right</kbd> | Move to the end of the next or existing word |
| <kbd>Home</kbd> | Move to the beginning of the line |
| <kbd>End</kbd> | Move to the end of the line |
| <kbd>Pgup</kbd> | Move up by a page (viewport) |
| <kbd>Pgdn</kbd> | Move down by a page (viewport) |
| <kbd>Ctrl</kbd> + <kbd>Home</kbd> | Move to the beginning of the buffer |
| <kbd>Ctrl</kbd> + <kbd>End</kbd> | Move to the end of the buffer |

Regardless of being in mark mode, you can expand an existing selection using the following non-configurable key bindings:

| Key binding | Result |
| ----------- | ------ |
| <kbd>Shift</kbd> + Arrow keys | Expand by character in the specified direction |
| <kbd>Ctrl</kbd> + <kbd>Left</kbd> | Expand to the beginning of the previous or existing word |
| <kbd>Ctrl</kbd> + <kbd>Right</kbd> | Expand to the end of the next or existing word |
| <kbd>Shift</kbd> + <kbd>Home</kbd> | Expand to the beginning of the line |
| <kbd>Shift</kbd> + <kbd>End</kbd> | Expand to the end of the line |
| <kbd>Shift</kbd> + <kbd>Pgup</kbd> | Expand up by a page (viewport) |
| <kbd>Shift</kbd> + <kbd>Pgdn</kbd> | Expand down by a page (viewport) |
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Home</kbd> | Expand to the beginning of the buffer |
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>End</kbd> | Expand to the end of the buffer |

Use the `toggleBlockSelection` action to transform the existing selection into a block selection.

Any selection created or modified by the keyboard also displays selection markers to indicate which end of the selection is actively being moved. You can use the `switchSelectionEndpoint` action to begin moving the other end of the selection.

Once you have a selection present, you have a few options. You can use the <kbd>ESC</kbd> key to clear the selection. Alternatively, most key input clears the selection and passes the key event directly to the underlying shell. If you actually want to use the selected text, you can use the `copy` action to copy it to your clipboard.

## Copying selected text

As mentioned above, selected text can be copied with a right-click or the `copy` action. However, there are a number of settings regarding copying text that you can customize:
- Copying formatted text
- You can use the `copyFormatting` global setting to also copy the formatting of the selected text itself to the clipboard. This allows you to copy the terminal's font information such as foreground color, background color, and font.
- If you want to limit copying the formatting to certain key bindings (or commands), you can modify the `copyFormatting` parameter on a `copy` action.
- Copying as a single line
- You can copy text as a single line using the `singleLine` parameter in the `copy` action.
- Removing trailing whitespace from block selections
- You can remove the trailing whitespace from a block selection using the `trimBlockSelection` global setting.

You can also use the `copyOnSelect` global setting to have newly selected text automatically copied to your clipboard. With this setting enabled, if a selection is present, right-clicking the terminal copies and pastes the selected text to your terminal.

> [!NOTE]
> If `copyOnSelect` is enabled, modifying the selection using the keyboard does not automatically copy the newly selected text. You will need to manually copy the text using the `copy` action or by right-clicking the terminal.

## Customizing the appearance of selections

Color schemes let you customize the selection color using the `selectionBackground` property in a color scheme. Alternatively, you can override the selection color for a specific profile using the `selectionBackground` profile setting.

## Customizing word delimiters

As mentioned above, double-clicking and using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + Arrow keys (or <kbd>Ctrl</kbd> + Arrow keys when in mark mode) allow you to navigate by word. However, words can be separated by more than just whitespace. You can customize these word boundaries using the `wordDelimiters` global setting.
4 changes: 4 additions & 0 deletions TerminalDocs/tutorials/custom-prompt-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ This will install:
- `oh-my-posh.exe`: The Windows executable
- `themes`: The latest [Oh My Posh themes](https://ohmyposh.dev/docs/themes)

You will need to agree to the source terms and may run into the instance that more than one package is available. In this case, select package ID that you wish to use and re-enter the command: `winget install <package ID>`.

![Screenshot of winget install oh my posh packages.](../images/oh-my-posh-winget.png)

To ensure you have the latest updates, you can use the following command: `winget upgrade oh-my-posh`.

> [!NOTE]
Expand Down