Skip to content

Main > Live #481

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

Merged
merged 18 commits into from
Jan 14, 2022
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
2 changes: 1 addition & 1 deletion TerminalDocs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Below is the full list of supported commands and options for the `wt` command li
| `split-pane`, `sp` | `--startingDirectory, -d starting-directory` | Creates a new split window pane based on the assigned starting directory path. If this parameter is not assigned, the default starting directory will be used. | Directory path |
| `split-pane`, `sp` | `--title` | Creates a new split window pane with the assigned title. | Text to use as the tab title |
| `split-pane`, `sp` | `--tabColor` | Creates a new split window pane with the assigned tab color. | Hex color as #RGB or #RRGGBB |
| `split-pane`, `sp` | `--size, -s size`| Creates a new split window pane with the assigned size. | Float that specifies the portion of the parent pane to use |
| `split-pane`, `sp` | `--size, -s size`| Creates a new split window pane with the assigned size. | Float that specifies the portion of the parent pane to use represented by a decimal. For example, `.4` to represent 40% of the parent pane. |
| `split-pane`, `sp` | `commandline` | Creates a new split window pane based on the assigned command line. | Executable with optional commands |
| `split-pane`, `sp` | `--duplicate, -D` | Creates a new split window pane that is a duplicate of the current pane. | N/A. No additional values to assign. |

Expand Down
40 changes: 1 addition & 39 deletions TerminalDocs/dynamic-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal Dynamic Profiles
description: Learn about dynamic profiles in Windows Terminal.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 08/30/2021
ms.date: 01/06/2022
ms.topic: conceptual
---

Expand Down Expand Up @@ -137,41 +137,3 @@ Assuming that you've installed MSYS2 into `C:\\msys64`:
```

For more details, see the Terminals section of the [MSYS2 documentation](https://www.msys2.org/docs/terminals/#windows-terminal).

### Developer Command Prompt for Visual Studio

Assuming that you've installed [Visual Studio](/visualstudio/install/install-visual-studio):

```json
{
"name": "Developer Command Prompt",
"commandline": "cmd.exe /k \"C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/Tools/VsDevCmd.bat\"",
"startingDirectory": "%USERPROFILE%"
}
```

> [!NOTE]
> Visual Studio’s “Developer Powershell” and “Developer Command Prompt” include shell environment variables and tools settings that would not be available in the default Command Prompt or Powershell instance.

### Developer Powershell for Visual Studio

Assuming that you've installed [Visual Studio](/visualstudio/install/install-visual-studio):

```json
{
"name": "Developer Powershell",
"commandline": "powershell.exe -noe -c \"&{Import-Module \"\"\"C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/Tools/Microsoft.VisualStudio.DevShell.dll\"\"\"; Enter-VsDevShell 994a9d58}\""
}
```

To find the `commandline` path to use in the Windows Terminal settings for your Visual Studio instance:

1. Find the shortcut to `Developer Powershell for VS 2019` in the start menu
2. Right-click and select `Open File Location`
3. Right-click and select `Properties` on the shortcut
4. Inspect the `Target` field. It will be some value like `C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -noe -c "&{Import-Module """C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"""; Enter-VsDevShell 994a9d58}"`
5. Use `Target` field value to update the file path for `Import-Module` in the profile `commandline`
6. Use `Target` field value to update the unique instance ID used with the `Enter-VsDevShell` command in the profile `commandline`

> [!NOTE]
> Visual Studio’s “Developer Powershell” and “Developer Command Prompt” include shell environment variables and tools settings that would not be available in the default Command Prompt or Powershell instance.
10 changes: 5 additions & 5 deletions TerminalDocs/faq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ metadata:
title: Windows Terminal FAQ
description: Frequently asked questions about Windows Terminal, such as how to start terminal in administrator mode, how to save a terminal session, and more.
ms.topic: troubleshooting
ms.date: 12/09/2021
ms.date: 01/06/2022
ms.author: mattwoj
author: mattwojo
manager: jken
Expand Down Expand Up @@ -96,14 +96,14 @@ sections:

![Screenshot of filing an issue in terminal repo](./images/file-issue.png)

- question: How can I customize PowerShell prompt colors using PSReadLine?
answer: |
The PSReadLine module is responsible for setting the colors and behavior of your PowerShell command line. You can set colors for specific attributes of your PowerShell prompt by using the [Set-PSReadLineOption, see Example 4: Set multiple color options](/powershell/module/psreadline/set-psreadlineoption#example-4--set-multiple-color-options).

# - question: Is there a way to sync your terminal settings across devices?
# answer: |
# TBD

# - question: Can we expect a status bar on the bottom of Windows Terminal?
# answer: |
# TBD

# - question: TBD
# answer: |
# TBD
12 changes: 9 additions & 3 deletions TerminalDocs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ If you click on the "settings" button in the dropdown, the Terminal will attempt

## Set your WSL distribution to start in the home `~` directory when launched

By default, the `startingDirectory` of a profile is `%USERPROFILE%` (`C:\Users\<YourUsername>`). This is a Windows path. For WSL, however, you may want to use the WSL home path instead. `startingDirectory` only accepts a Windows-style path, so setting it to start within a WSL distribution requires a prefix.
By default, the `startingDirectory` of a profile is `%USERPROFILE%` (`C:\Users\<YourUsername>`). This is a Windows path. For WSL distributions, the file systems are now directly referenced, as of Windows Terminal [version 1.12.3472.0](https://github.com/microsoft/terminal/releases). You can use `/home/<Your Ubuntu Username>` to directly refer to your home folder. For example, the following setting will launch the "Ubuntu-20.04" distribution in its home file path:

Beginning in Windows 10 version 1903, the file systems of WSL distributions can be addressed using the `\\wsl$\` prefix. For any WSL distribution with the name `DistroName`, use `\\wsl$\DistroName` as a Windows path that points to the root of that distribution's file system.
```json
{
"name": "Ubuntu-20.04",
"commandline" : "wsl -d Ubuntu-20.04",
"startingDirectory" : "/home/<Your Ubuntu Username>"
}
```

For example, the following setting will launch the "Ubuntu-18.04" distribution in its home file path:
If you are using an earlier version of Windows Terminal, WSL may require using the `\\wsl$\` prefix when referring to a distribution's home path for the `startingDirectory` setting. For example, in earlier versions of Windows Terminal the following setting will launch the "Ubuntu-18.04" distribution in its home file path:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion TerminalDocs/tutorials/custom-prompt-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ You can [customize the Oh My Posh themes](https://ohmyposh.dev/docs/linux#custom
To install Terminal-Icons with PowerShell, use the command:

```powershell
PS> Install-Module -Name Terminal-Icons -Repository PSGallery
Install-Module -Name Terminal-Icons -Repository PSGallery
```

For more information, including usage and commands, see the [Terminal-Icons](https://github.com/devblackops/Terminal-Icons) repo on GitHub.
Expand Down