Skip to content

Commit

Permalink
Public PRs (#238)
Browse files Browse the repository at this point in the history
* command-line-arguments.md: Tag the Command Prompt code blocks

For some reason they were tagged as bash, which broke highlighting in at least one of them.

* fixed typo (#220)

in line 98 it's `C:\\path\\to\\icon.png` while in line 115 it was `C:\\path\\to\\icon` so I've added the missing `.png`

* Add note about escaping characters with backslash (#230)

Originally filed by Andrewery https://github.com/MicrosoftDocs/terminal/pull/134/files

* Add icon example and folder location (#231)

From #135

* Add icon example and folder location

As originally submitted by @aloneguid in #135

* Remove code brackets for readability

* Add spacing

* Fix default value by escaping characters (#232)

Original submission: https://github.com/MicrosoftDocs/terminal/pull/134/files

* Add info about the command palette (#180)

* Add info about the command palette

1. Add info about the command palette.
2. Typo fixes (e.g. "quick-start guide" instead of "quickstart")
3. Style fix, e.g. we don't have a keyboard key whose full name is "alt+shift+plus".

* revert description

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Add backslash escape note (#233)

...from PR #181

* Add a note about hiding dynamic profiles (#186)

* Add a note about hiding dynamic profiles

* Minor writing updates

Co-authored-by: Matt Wojciakowski <mattwoj@microsoft.com>

* Clarify adding profile in ssh tutorial. Fixes #183 (#193)

* Clarify adding profile in ssh tutorial. Fixes: #183

* Remove  from docs link

* Add guid command for powershell (#234)

migrated from PR https://github.com/MicrosoftDocs/terminal/pull/199/files

* Change "i.e." to "e.g." (#207)

This seems to be the intended meaning: There are Linux distributions that are not Ubuntu, but Ubuntu is an example of a Linux distribution for which the behavior is the given.

* Old Ubuntu: Use up-to-date version of golang (#216)

Currently, the install recommends using an out-of-date version of golang, which in turn causes issues while installing powerline-go.

* Add startingDirectory example (#237)

* Add startingDirectory example

* Format startingDirectory entry

* remove icon file type

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>

* Change icon description to example

* Change false to true

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>

* Remove unnecessary sentence

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>

* Typo fixes

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>

* link fix

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>

* Capitalization fixes

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>

* shortcut fixes

Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.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: Mike Griese <migrie@microsoft.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: Kayla Cinnamon <cinnamon@microsoft.com>
  • Loading branch information
9 people committed Feb 8, 2021
1 parent 7855b73 commit 85519c6
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 35 deletions.
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"`.

<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

0 comments on commit 85519c6

Please sign in to comment.