Skip to content

Commit

Permalink
Merge master into live (#310)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>
Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>
Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Don-Vito <khvitaly@gmail.com>
Co-authored-by: Samuel Bronson <naesten@gmail.com>
Co-authored-by: LSC <schad.lucas@gmail.com>
Co-authored-by: skycommand <jadangerbrooks@hotmail.com>
Co-authored-by: Cameron Durham <cdurham@usc.edu>
Co-authored-by: Søren Fuglede Jørgensen <github@fuglede.dk>
Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>
Co-authored-by: Meenal Patel <42360097+v-mepa@users.noreply.github.com>
Co-authored-by: Jan De Dobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com>
Co-authored-by: Dakkaron <dak1st@gmx.at>
Co-authored-by: Ibrahim Rouis <73853380+rouisibra@users.noreply.github.com>
Co-authored-by: Michael James <mike@mjjames.co.uk>
  • Loading branch information
15 people committed Apr 14, 2021
1 parent d846289 commit 29676b1
Show file tree
Hide file tree
Showing 16 changed files with 251 additions and 72 deletions.
81 changes: 79 additions & 2 deletions TerminalDocs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal command line arguments
description: Learn how to create command line arguments for Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 02/25/2021
ms.date: 04/14/2021
ms.topic: how-to
---

Expand Down Expand Up @@ -41,19 +41,25 @@ Below is the full list of supported commands and options for the `wt` command li
| Command | Parameters | Description |
| ------- | ---------- | ----------- |
| `new-tab`, `nt` | `--profile, -p profile-name`, `--startingDirectory, -d starting-directory`, `commandline`, `--title`, `--tabColor` | Creates a new tab. |
| `split-pane`, `sp` | `-H, --horizontal`, `-V, --vertical`, `--profile, -p profile-name`, `--startingDirectory, -d starting-directory`, `--title`, `--tabColor`, `--size, -s size`, `commandline` | Splits a new pane. |
| `split-pane`, `sp` | `-H, --horizontal`, `-V, --vertical`, `--profile, -p profile-name`, `--startingDirectory, -d starting-directory`, `--title`, `--tabColor`, `--size, -s size`, `commandline`, `-D, --duplicate` | Splits a new pane. |
| `focus-tab`, `ft` | `--target, -t tab-index` | Focuses on a specific tab. |
| `move-focus`, `mf` | `direction` | Move focus between panes in the given direction. Accepts one of `up`, `down`, `left`, `right`. |

> [!NOTE]
> When opening Windows Terminal from cmd (Command Prompt), if you want to use your custom "cmd" profile settings, you will need to use the command `wt -p cmd`. Otherwise, to run your *default* profile settings, just use `wt cmd`.
> [!IMPORTANT]
> The `-D, --duplicate` parameter for `split-pane` is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
## Command line argument examples

Commands may vary slightly depending on which command line you're using.

### Target a specific window

> [!IMPORTANT]
> The ability for the `--window,-w` parameter to accept window names is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
Below are examples of how to target specific windows using the `--window,-w` option.

<!-- Start tab selectors. -->
Expand All @@ -68,6 +74,9 @@ wt -w -1 nt
// Open a new tab in the first-created terminal window with the default profile
wt -w 1 nt
// Open a new tab in the terminal window named foo with the default profile. If foo does not exist, create a new window named foo.
wt -w foo nt
```

#### [PowerShell](#tab/powershell)
Expand All @@ -81,6 +90,9 @@ wt -w -1 nt
// Open a new tab in the first-created terminal window with the default profile
wt -w 1 nt
// Open a new tab in the terminal window named foo with the default profile. If foo does not exist then, create a new window named foo.
wt -w foo nt
```

#### [Linux](#tab/linux)
Expand All @@ -94,6 +106,9 @@ cmd.exe /c "wt.exe" -w -1 nt

// Open a new tab in the first-created terminal window with the default profile
cmd.exe /c "wt.exe" -w 1 nt

// Open a new tab in the terminal window named foo with the default profile. If foo does not exist then, create a new window named foo.
cmd.exe /c "wt.exe" -w foo nt
```

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running `cmd.exe`. The `/c` option tells CMD to terminate after running.
Expand Down Expand Up @@ -307,6 +322,37 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr
---
<!-- End tab selectors. -->

### Using application title ([Preview](https://aka.ms/terminal-preview))

To open a new terminal instance allowing applications within it to set the tab title by sending title change messages, use the `--useApplicationTitle` flag. To suppress these messages, use the `--suppressApplicationTitle` flag. If none of these flags are provided, the behavior is inherited from the profile's settings. To open a tab with title `tabname` that will not be overridden by the application, enter:

<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```cmd
wt --title tabname --suppressApplicationTitle
```

#### [PowerShell](#tab/powershell)

```powershell
wt --title tabname --suppressApplicationTitle
```

#### [Linux](#tab/linux)

```bash
cmd.exe /c "wt.exe" --title tabname --suppressApplicationTitle
```

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running `cmd.exe`. The `/c` option tells CMD to terminate after running and the `\;` backslash + semicolon separates commands.

---
<!-- End tab selectors. -->

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

To open a new terminal instance with custom tab colors, use the `--tabColor` argument. This argument overrides the value defined in the profile, but can be overridden as well using the tab color picker. In the following example, a new terminal is created with two tabs of different colors:
Expand Down Expand Up @@ -341,6 +387,37 @@ When `--tabColor` is set for a tab, it is associated with the first pane of this
wt new-tab --tabColor #009999 ; split-pane --tabColor #f59218
```

### Color scheme ([Preview](https://aka.ms/terminal-preview))

To open a new terminal instance with a specific color scheme (instead of the `colorScheme` set in the profile), use the `--colorScheme` argument. This argument overrides the value defined in the profile.

<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```cmd
wt --colorScheme Vintage ; split-pane --colorScheme "Tango Light"
```

#### [PowerShell](#tab/powershell)

```powershell
wt --colorScheme Vintage ; split-pane --colorScheme "Tango Light"
```

#### [Linux](#tab/linux)

```bash
cmd.exe /c "wt.exe" --colorScheme Vintage \; split-pane --colorScheme "Tango Light"
```

Execution aliases do not work in WSL distributions. If you want to use wt.exe from a WSL command line, you can spawn it from CMD directly by running `cmd.exe`. The `/c` option tells CMD to terminate after running and `\;` separates commands.

---
<!-- End tab selectors. -->

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

To open a new terminal instance with a specific tab in focus, use the `-t` flag (or `--target`), along with the tab-index number. To open your default profile in the first tab and the "Ubuntu-18.04" profile focused in the second tab (`-t 1`), enter:
Expand Down
120 changes: 110 additions & 10 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: 02/25/2021
ms.date: 04/14/2021
ms.topic: how-to
ms.localizationpriority: high
---
Expand Down Expand Up @@ -165,7 +165,7 @@ This opens the search dialog box. More information on search can be found on the
{ "command": "find", "keys": "ctrl+shift+f" }
```

### Find next/previous search match ([Preview](https://aka.ms/terminal-preview))
### Find next/previous search match

This lets you navigate through your search matches.

Expand All @@ -184,9 +184,6 @@ This lets you navigate through your search matches.
| ---- | --------- | ------- | ----------- |
| `direction` | Required | `"next"`, `"prev"` | The direction to navigate through search results. |

> [!IMPORTANT]
> The `"settingsUI"` value for `target` is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
### Open the dropdown

This opens the dropdown menu.
Expand Down Expand Up @@ -372,6 +369,12 @@ This creates a new tab. Without any arguments, this will open the default profil
| `tabTitle` | Optional | String | Title of the new tab. |
| `index` | Optional | Integer | Profile that will open based on its position in the dropdown (starting at 0). |
| `profile` | Optional | Profile's name or GUID as a string | Profile that will open based on its GUID or name. |
| `colorScheme` | Optional | The name of a color scheme as a string | The scheme to use instead of the profile's set `colorScheme` |
| `suppressApplicationTitle` | Optional | `true`, `false` | When set to `false`, applications can change the tab title by sending title change messages. When set to `true`, these messages are suppressed. If not provided, the behavior is inherited from the profile's settings. |

> [!IMPORTANT]
> The `"colorScheme"` and `"suppressApplicationTitle"` parameters are only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).

### Open next tab

Expand All @@ -385,6 +388,15 @@ This opens the tab to the right of the current one.
{ "command": "nextTab", "keys": "ctrl+tab" }
```

#### Actions

| Name | Necessity | Accepts | Description |
| ---- | --------- | ------- | ----------- |
| `tabSwitcherMode` | Optional | `"mru"`, `"inOrder"`, `"disabled"` | Move to the next tab using `"tabSwitcherMode"`. If no mode is provided, use the globally defined one. |

> [!IMPORTANT]
> The `"tabSwitcherMode"` parameter is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
### Open previous tab

This opens the tab to the left of the current one.
Expand All @@ -397,6 +409,15 @@ This opens the tab to the left of the current one.
{ "command": "prevTab", "keys": "ctrl+shift+tab" }
```

#### Actions

| Name | Necessity | Accepts | Description |
| ---- | --------- | ------- | ----------- |
| `tabSwitcherMode` | Optional | `"mru"`, `"inOrder"`, `"disabled"` | Move to the previous tab using `"tabSwitcherMode"`. If no mode is provided, use the globally defined one. |

> [!IMPORTANT]
> The `"tabSwitcherMode"` parameter is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
### Tab search

:::row:::
Expand Down Expand Up @@ -567,10 +588,85 @@ This creates a new window. Without any arguments, this will open the default pro
| `tabTitle` | Optional | String | Title of the window tab. |
| `index` | Optional | Integer | Profile that will open based on its position in the dropdown (starting at 0). |
| `profile` | Optional | Profile's name or GUID as a string | Profile that will open based on its GUID or name. |
| `suppressApplicationTitle` | Optional | `true`, `false` | When set to `false` allows applications to change tab title by sending title change messages. When set to true `true` suppresses these messages. If not provided, the behavior is inheritted from profile settings. |

> [!IMPORTANT]
> The `"suppressApplicationTitle"` parameter is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
### Rename window ([Preview](https://aka.ms/terminal-preview))

This command can be used to rename a window to a specific string.

**Command name:** `renameWindow`

**Default binding:**

_This command is not currently bound in the default settings_.

```json
// Rename a window to "Foo"
{ "command": { "action": "renameWindow", "name": "Foo" }, "keys": "" }

// Reset the window's name
{ "command": { "action": "renameWindow", "name": null }, "keys": "" }
```

#### Actions

| Name | Necessity | Accepts | Description |
| ---- | --------- | ------- | ----------- |
| `name` | Optional | String | The new name to use for this window. If omitted, this command will revert the window name back to its original value. |

> [!IMPORTANT]
> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview), version 1.7+.
### Open window rename dialog ([Preview](https://aka.ms/terminal-preview))

This command changes displays a popup window that lets you edit the name for the current window. Clearing the text field will reset the window name.

**Command name:** `openWindowRenamer`

**Default binding:**

```json
{ "command": "openWindowRenamer" }
```

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

This pops up an overlay on the focused window that displays the window's name and index.

**Command name:** `identifyWindow`

**Default binding:**

```json
{"command": "identifyWindow", "keys": "" },
```

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

This pops up an overlay on all windows that displays each window's name and index.

**Command name:** `identifyWindows`

**Default binding:**

_This command is not currently bound in the default settings_.

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

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

Expand Down Expand Up @@ -652,7 +748,7 @@ This changes the size of the active pane.
| ---- | --------- | ------- | ----------- |
| `direction` | Required | `"left"`, `"right"`, `"up"`, `"down"` | Direction in which the pane will be resized. |

### Mark a pane as read-only ([Preview](https://aka.ms/terminal-preview))
### Mark a pane as read-only

You can mark a pane as read-only, which will prevent input from going into the text buffer. If you attempt to close or input text into a read-only pane, the terminal will display a popup warning instead.

Expand All @@ -664,9 +760,6 @@ You can mark a pane as read-only, which will prevent input from going into the t
{ "command": "toggleReadOnlyMode" }
```

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

This halves the size of the active pane and opens another. Without any arguments, this will open the default profile in the new pane. If an action is not specified, the default profile's equivalent setting will be used.
Expand Down Expand Up @@ -694,9 +787,14 @@ This halves the size of the active pane and opens another. Without any arguments
| `tabTitle` | Optional | String | Title of the tab when the new pane is focused. |
| `index` | Optional | Integer | Profile that will open based on its position in the dropdown (starting at 0). |
| `profile` | Optional | Profile's name or GUID as a string | Profile that will open based on its GUID or name. |
| `colorScheme` | Optional | The name of a color scheme as a string | The scheme to use instead of the profile's set `colorScheme` |
| `suppressApplicationTitle` | Optional | `true`, `false` | When set to `false`, applications can change the tab title by sending title change messages. When set to `true`, these messages are suppressed. If not provided, the behavior is inherited from the profile's settings. |
| `splitMode` | Optional | `"duplicate"` | Controls how the pane splits. Only accepts `"duplicate"`, which will duplicate the focused pane's profile into a new pane. |
| `size` | Optional | Float | Specify how large the new pane should be, as a fraction of the current pane's size. `1.0` would be "all of the current pane", and `0.0` is "None of the parent". Defaults to `0.5`. |

> [!IMPORTANT]
> The `"colorScheme"` and `"suppressApplicationTitle"` parameters are only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
<br />

___
Expand Down Expand Up @@ -850,7 +948,9 @@ This changes the text size by a specified point amount.

```json
{ "command": { "action": "adjustFontSize", "delta": 1 }, "keys": "ctrl+=" },
{ "command": { "action": "adjustFontSize", "delta": -1 }, "keys": "ctrl+-" }
{ "command": { "action": "adjustFontSize", "delta": -1 }, "keys": "ctrl+-" },
{ "command": { "action": "adjustFontSize", "delta": 1 }, "keys": "ctrl+numpad_plus" },
{ "command": { "action": "adjustFontSize", "delta": -1 }, "keys": "ctrl+numpad_minus" },
```

#### Actions
Expand Down
11 changes: 6 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: 02/25/2021
ms.date: 04/14/2021
ms.topic: how-to
ms.localizationpriority: high
---
Expand All @@ -12,9 +12,6 @@ ms.localizationpriority: high

The properties listed below affect the entire terminal window, regardless of the profile settings. These should be placed at the root of your settings.json file.

> [!IMPORTANT]
> The settings UI is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
## Theme

:::row:::
Expand Down Expand Up @@ -45,7 +42,11 @@ ___

:::row:::
:::column span="":::
When this is set to `true`, tabs are always displayed. When it's set to `false` and `showTabsInTitlebar` is set to `true`, tabs are always displayed underneath the title bar. When this is set to `false` and `showTabsInTitlebar` is set to `false`, tabs only appear after more than one tab exists by typing <kbd>ctrl+shift+t</kbd> or by typing the key binding assigned to `newTab`. Note that changing this setting will require starting a new terminal instance.
When this is set to `true`, tabs are always displayed. When it's set to `false` and `showTabsInTitlebar` is set to `false`, tabs are always displayed underneath the title bar. When this is set to `false` and `showTabsInTitlebar` is set to `false`, tabs only appear after more than one tab exists, by typing <kbd>ctrl+shift+t</kbd> or by typing the key binding assigned to `newTab`. Note that changing this setting will require starting a new terminal instance.

> [!NOTE]
> This setting has no effect when `showTabsInTitlebar` is `true`.

**Property name:** `alwaysShowTabs`

Expand Down
Loading

0 comments on commit 29676b1

Please sign in to comment.