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

Public PRs #238

Merged
merged 21 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions TerminalDocs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can use `wt.exe` to open a new instance of Windows Terminal from the command

The `wt` command line accepts two types of values: **options** and **commands**. **Options** are a list of flags and other parameters that can control the behavior of the `wt` command line as a whole. **Commands** provide the action, or list of actions separated by semicolons, that should be implemented. If no command is specified, then the command is assumed to be `new-tab` by default.

```bash
```cmd
wt [options] [command ; ]
```

Expand Down Expand Up @@ -61,7 +61,7 @@ To open a new terminal instance, in this case the command will open the profile
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt -p "Ubuntu-18.04"
```

Expand Down Expand Up @@ -91,7 +91,7 @@ To specify the folder that should be used as the starting directory for the cons
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt -d d:\
```

Expand Down Expand Up @@ -119,7 +119,7 @@ To open a new terminal instance with multiple tabs, enter:
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt ; ;
```

Expand Down Expand Up @@ -147,7 +147,7 @@ To open a new terminal instance with multiple tabs, in this case a Command Promp
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt -p "Command Prompt" ; new-tab -p "Windows PowerShell"
```

Expand Down Expand Up @@ -177,7 +177,7 @@ To open a new terminal instance with one tab containing three panes running a Co
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt -p "Command Prompt" ; split-pane -p "Windows PowerShell" ; split-pane -H wsl.exe
```

Expand Down Expand Up @@ -209,7 +209,7 @@ The `new-tab` and `split-pane` commands can be sequenced to get multiple tabs, e
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt -p "Command Prompt" ; split-pane -V wsl.exe ; new-tab -d c:\ ; split-pane -H -d c:\ wsl.exe
```

Expand Down Expand Up @@ -239,7 +239,7 @@ To open a new terminal instance with custom tab titles, use the `--title` argume
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt --title tabname1 ; new-tab -p "Ubuntu-18.04" --title tabname2
```

Expand Down Expand Up @@ -267,7 +267,7 @@ To open a new terminal instance with custom tab colors, use the `--tabColor` arg
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt --tabColor #009999 ; new-tab --tabColor #f59218
```

Expand Down Expand Up @@ -304,7 +304,7 @@ To open a new terminal instance with a specific tab in focus, use the `-t` flag
<!-- Start tab selectors. -->
#### [Command Prompt](#tab/windows)

```bash
```cmd
wt ; new-tab -p "Ubuntu-18.04" ; focus-tab -t 1
```

Expand Down
8 changes: 6 additions & 2 deletions TerminalDocs/customize-settings/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ This determines the word delimiters used in a double-click selection. Word delim

**Accepts:** Characters as a string

**Default value:** <code>&nbsp;&#x2f;&#x5c;&#x28;&#x29;&#x22;&#x27;&#x2d;&#x3a;&#x2c;&#x2e;&#x3b;&#x3c;&#x3e;&#x7e;&#x21;&#x40;&#x23;&#x24;&#x25;&#x5e;&#x26;&#x2a;&#x7c;&#x2b;&#x3d;&#x5b;&#x5d;&#x7b;&#x7d;&#x7e;&#x3f;│</code><br>_(`│` is `U+2502 BOX DRAWINGS LIGHT VERTICAL`)_
**Default value:**
<code>&nbsp;&#x2f;&#x5c;&#x5c;&#x28;&#x29;&#x5c;&#x22;&#x27;&#x2d;&#x3a;&#x2c;&#x2e;&#x3b;&#x3c;&#x3e;&#x7e;&#x21;&#x40;&#x23;&#x24;&#x25;&#x5e;&#x26;&#x2a;&#x7c;&#x2b;&#x3d;&#x5b;&#x5d;&#x7b;&#x7d;&#x7e;&#x3f;│</code>
<br>
_(`│` is `U+2502 BOX DRAWINGS LIGHT VERTICAL`)_

<br />
> [!IMPORTANT]
> The following characters must be escaped with a backslash : `\`, `"`

___

Expand Down
3 changes: 2 additions & 1 deletion TerminalDocs/customize-settings/profile-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ Profiles can use a GUID as a unique identifier. To make a profile your default p

**Accepts:** GUID as a string in registry format: `"{00000000-0000-0000-0000-000000000000}"`

<br />
> [!TIP]
> You can run `[guid]::NewGuid()` in PowerShell to generate a GUID for your custom profile.

___

Expand Down
25 changes: 12 additions & 13 deletions TerminalDocs/customize-settings/profile-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,19 @@ This is the directory the shell starts in when it is loaded.

**Default value:** `"%USERPROFILE%"`

<br />
**Example:** Start the PowerShell profile in the *GitHubRepos* folder of your *Documents* directory by finding the powershell.exe profile and adding `"startingDirectory": "%USERPROFILE%/Documents/GitHubRepos",`

> [!NOTE]
> When setting the starting directory that your installed WSL distributions open to, you should use this format: `"startingDirectory": "\\\\wsl$\\DISTRO NAME\\home\\USERNAME"`, replacing with the name of your distribution. For example, `"startingDirectory": "\\\\wsl$\\Ubuntu-20.04\\home\\user1"`.
**Example with WSL:** When setting the starting directory for a [Linux distribution installed via WSL](https://docs.microsoft.com/windows/wsl/install-win10), use the format: `"startingDirectory": "\\\\wsl$\\DISTRO NAME\\home\\USERNAME"`, replacing with the placeholders with the proper names of your distribution. For example, `"startingDirectory": "\\\\wsl$\\Ubuntu-20.04\\home\\user1"`.

**Default behavior:** When the startingDirectory value is not specified, you will get different results depending on where you launch Terminal:
- If you run Windows Terminal from the Start menu: C:\windows\system32
- If you run wt.exe from the Start menu: C:\windows\system32
- If you run wt.exe from Win+R: %USERPROFILE%
- If you run wt.exe from the explorer address bar: whatever folder you were looking at.

> [!NOTE]
> Omitting the startingDirectory value in a profile results in...
</br>
..if you run Windows Terminal from the Start menu: C:\windows\system32
</br>
..if you run wt.exe from the Start menu: C:\windows\system32
</br>
..if you run wt.exe from Win+R: %USERPROFILE%
</br>
..if you run wt.exe from the explorer address bar: whatever folder you were looking at.
> Backslashes need to be escaped. For example, `C:\Users\USERNAME\Documents` should be entered as `C:\\Users\\USERNAME\\Documents`.

___

## Icon
Expand All @@ -95,8 +93,9 @@ This sets the icon that displays within the tab, dropdown menu, jumplist, and ta

**Accepts:** File location as a string, or an emoji

<br />
**Example:** Placing the icon image `ubuntu.ico` in the folder located at `%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState`, you can display the icon by adding this line to the profile in your settings.json: `"icon": "ms-appdata:///roaming/ubuntu.ico"`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Example:** Placing the icon image `ubuntu.ico` in the folder located at `%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState`, you can display the icon by adding this line to the profile in your settings.json: `"icon": "ms-appdata:///roaming/ubuntu.ico"`.
**Example:** By placing the icon image `ubuntu.ico` in the folder located at `%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState`, you can display the icon by adding this line to the profile in your settings.json: `"icon": "ms-appdata:///roaming/ubuntu.ico"`.


<br>
___

## Tab title
Expand Down
12 changes: 9 additions & 3 deletions TerminalDocs/get-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Windows Terminal installation
description: In this quickstart, you will learn how to install and run Windows Terminal.
description: In this quickstart, you will learn how to install and set up Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 01/28/2021
Expand Down Expand Up @@ -28,11 +28,17 @@ The terminal will automatically create profiles for you if you have WSL distros

## Open a new tab

You can open a new tab of the default profile by pressing <kbd>ctrl+shift+t</kbd> or by selecting the + (plus) button. To open a different profile, select the ˅ (arrow) next to the + button to open the dropdown menu. From there, you can select which profile to open.
You can open a new tab of the default profile by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> or by selecting the + (plus) button. To open a different profile, select the ˅ (arrow) next to the + button to open the dropdown menu. From there, you can select which profile to open.

## Invoke the command palette

You can invoke most features of Windows Terminal through the [command palette](./command-palette.md). The default key combination to invoke it is <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>.

![Example of the command palette in use](./images/command-palette-iterable-commands.gif)

## Open a new pane

You can run multiple shells side-by-side using panes. To open a pane, you can use <kbd>alt+shift+plus</kbd> for a vertical pane or <kbd>alt+shift+minus</kbd> for a horizontal one. You can also use <kbd>alt+shift+d</kbd> to open a duplicate pane of your focused profile. Learn more about panes on the [Panes page](./panes.md).
You can run multiple shells side-by-side using panes. To open a pane, you can use <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>+</kbd> for a vertical pane or <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>-</kbd> for a horizontal one. You can also use <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> to open a duplicate pane of your focused profile. Learn more about panes on the [Panes page](./panes.md).

## Configuration

Expand Down
8 changes: 8 additions & 0 deletions TerminalDocs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ Alternatively, if you are running a script using the `commandline` profile setti

The purpose of `startingDirectory` is to launch a new Windows Terminal instance in the given directory. If the terminal runs any code that changes its directory, that may be a good place to take a look.

## Deleting a profile

By default, Windows Terminal ships with a built-in PowerShell and a Command Prompt profile. The terminal will also autodetect if other command line applications are installed, such as PowerShell Core, WSL distributions (Ubuntu, Debian, etc), and Azure Cloud Shell. We call these types of automatically generated profiles "Dynamic profiles".

For both built-in and dynamic profiles, deleting the profile from your settings.json file will not remove it from your profiles. Built-in profiles are defined in `defaults.json`, so they're always available. Dynamic profiles will attempt to create a JSON stub for their profile in your `settings.json` file whenever a profile is not already present in the file.

The only way to truly remove these profiles from the list is by "hiding" them. To hide a profile, add the property `"hidden": true` to the profile.

## Ctrl+= does not increase the font size

If you are using a German keyboard layout, you may run into this problem. <kbd>ctrl+=</kbd> gets deserialized as <kbd>ctrl+shift+0</kbd> if your main keyboard layout is set to German. This is the correct mapping for German keyboards.
Expand Down
7 changes: 7 additions & 0 deletions TerminalDocs/tutorials/powerline-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ sudo apt install golang-go
go get -u github.com/justjanne/powerline-go
```

> [!TIP]
> If you're using Ubuntu 18.04 or 16.04, you'll need to first install the correct version of golang:
> ```bash
> sudo add-apt-repository ppa:longsleep/golang-backports
> sudo apt update
> ```

### Customize your Ubuntu prompt

Open your `~/.bashrc` file with `nano ~/.bashrc` or the text editor of your choice. This is a bash script that runs every time bash starts. Add the following, though beware that GOPATH may already exist:
Expand Down
19 changes: 14 additions & 5 deletions TerminalDocs/tutorials/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@ In this tutorial, you'll learn how to set up a profile in Windows Terminal that

## Create a profile

You can start an SSH session in your command prompt by executing `ssh user@machine` and you will be prompted to enter your password. You can create a Windows Terminal profile that does this on startup by adding the `commandline` setting to a profile in your settings.json file.
You can start an SSH session in your command prompt by executing `ssh user@machine` and you will be prompted to enter your password. You can create a Windows Terminal profile that does this on startup by adding the `commandline` setting to a profile in your settings.json file inside the `list` of profile objects.

```js
"commandline": "ssh cinnamon@roll"
```json
{
"name": "user@machine ssh profile",
"commandline": "ssh user@machine",
}
```

For more information, see:

* [Windows Terminal Profile - General settings](./../customize-settings/profile-general.md)

## Specify starting directory

To specify the starting directory for a ssh session invoked by Windows Terminal, you can use this command:

```bash
"commandline": "ssh -t bob@foo \"cd /data/bob && exec bash -l\""
```json
{
"commandline": "ssh -t bob@foo \"cd /data/bob && exec bash -l\""
}
```

The `-t` flag forces pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, e.g. when implementing menu services. You will need to use escaped double quotes as bourne shell derivatives don't do any additional parsing for a string in single quotes.
Expand Down
2 changes: 1 addition & 1 deletion TerminalDocs/tutorials/tab-title.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A shell has full control over its own title. However, each shell sets its title
| Command Prompt | `TITLE "New Title"` |
| bash* | `echo -ne "\033]0;New Title\a"` |

Note that some Linux distributions (i.e. Ubuntu) set their title automatically as you interact with the shell. If the above command doesn't work, run the following command:
Note that some Linux distributions (e.g. Ubuntu) set their title automatically as you interact with the shell. If the above command doesn't work, run the following command:

```bash
PS1=$
Expand Down