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

Main > Live sync #565

Merged
merged 70 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 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
7dbc720
Instructions for MINGW (#525)
alexeygrigorev Jul 7, 2022
1671a25
Add missing [Shift] in key binding (#557)
carlos-zamora Jul 7, 2022
e4f65a7
Fix PowerShell commands
mattwojo Jul 7, 2022
91a996e
Add Starship example (#530)
twobiers Jul 8, 2022
a394b14
Add Fish shell
mattwojo Jul 8, 2022
00bcff6
Move Mingw under WSL section
mattwojo Jul 8, 2022
4a2df31
Add focus mode tip
mattwojo Jul 8, 2022
2562bf5
Change bashrc config to bash_profile
mattwojo Jul 8, 2022
17c9574
[BULK UPDATE] DocuTune - Fix build validation issues: docs-link-absol…
alexbuckgit Jul 13, 2022
9ad8b87
Update interaction.md (#562)
kodedylf Aug 3, 2022
914453f
Merge branch 'live' into main
mattwojo Aug 3, 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
10 changes: 5 additions & 5 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
"redirections": [
{
"source_path": "TerminalDocs/customize-settings/key-bindings.md",
"redirect_url": "https://docs.microsoft.com/windows/terminal/customize-settings/actions",
"redirect_url": "/windows/terminal/customize-settings/actions",
"redirect_document_id": true
},
{
"source_path": "TerminalDocs/customize-settings/global-settings.md",
"redirect_url": "https://docs.microsoft.com/windows/terminal/customize-settings/startup",
"redirect_url": "/windows/terminal/customize-settings/startup",
"redirect_document_id": true
},
{
"source_path": "TerminalDocs/customize-settings/profile-settings.md",
"redirect_url": "https://docs.microsoft.com/windows/terminal/customize-settings/profile-general",
"redirect_url": "/windows/terminal/customize-settings/profile-general",
"redirect_document_id": true
},
{
"source_path": "TerminalDocs/get-started.md",
"redirect_url": "https://docs.microsoft.com/windows/terminal/install",
"redirect_url": "/windows/terminal/install",
"redirect_document_id": true
},
{
"source_path": "TerminalDocs/tutorials/powerline-setup.md",
"redirect_url": "https://docs.microsoft.com/windows/terminal/tutorials/custom-prompt-setup",
"redirect_url": "/windows/terminal/tutorials/custom-prompt-setup",
"redirect_document_id": true
}
]
Expand Down
4 changes: 2 additions & 2 deletions TerminalDocs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ wt --tabColor #009999 ; new-tab --tabColor #f59218
#### [PowerShell](#tab/powershell)

```powershell
wt --tabColor #009999 ; new-tab --tabColor #f59218
wt --tabColor '#009999' `; new-tab --tabColor '#f59218'
```

#### [Linux](#tab/linux)
Expand All @@ -448,7 +448,7 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr
When `--tabColor` is set for a tab, it is associated with the first pane of this tab. Hence in a tab with multiple panes, the color will be applied only if the first pane is in focus. To set the tab color for additional panes, you will need to add the `--tabColor` parameter to the `split-pane` subcommand as well. In the example below, a tab with two panes is created with tab colors specified for each pane:

```powershell
wt new-tab --tabColor #009999 ; split-pane --tabColor #f59218
wt new-tab --tabColor '#009999' `; split-pane --tabColor '#f59218'
```

### Color scheme
Expand Down
2 changes: 1 addition & 1 deletion TerminalDocs/customize-settings/interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ___

## Remove trailing white-space in rectangular selection

When this is set to `true` and you copy text in a rectangular (block) selection to the clipboard, trailing white-spaces are removed from each line. When it's set to `false`, the white-spaces are preserved, ensuring that all lines have the same length. To copy text in a rectangular (block) selection, hold down the <kbd>Alt</kbd> key, right-click, and drag your mouse over the text area you want to select. This can be useful for selecting text columns, etc.
When this is set to `true` and you copy text in a rectangular (block) selection to the clipboard, trailing white-spaces are removed from each line. When it's set to `false`, the white-spaces are preserved, ensuring that all lines have the same length. To copy text in a rectangular (block) selection, hold down the <kbd>Alt</kbd> key, click and drag your mouse over the text area you want to select. This can be useful for selecting text columns, etc.

**Property name:** `trimBlockSelection`

Expand Down
4 changes: 2 additions & 2 deletions TerminalDocs/selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Regardless of being in mark mode, you can expand an existing selection using the
| 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>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Left</kbd> | Expand to the beginning of the previous or existing word |
| <kbd>Ctrl</kbd> + <kbd>Shift</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) |
Expand Down
20 changes: 19 additions & 1 deletion TerminalDocs/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Windows Terminal tips and tricks
description: In this page, you will find tips and tricks to help improve your Windows Terminal experience.
author: cinnamon-msft
ms.author: cinnamon
ms.date: 10/08/2021
ms.date: 07/08/2022
ms.topic: how-to
---

Expand Down Expand Up @@ -130,6 +130,24 @@ Navigating to the parent directory with a key binding may also be helpful.

You can also use this functionality to run builds or test scripts.

## Focus mode

"Focus mode" hides the title bar and tabs normally located at the top of Windows Terminal, letting you focus only on the terminal content. It is similar to ["Zen mode"](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_zen-mode) in Visual Studio Code.

To enter focus mode, open the [command pallette](./command-palette.md) using `Ctrl` + `Shift` + `p`, enter "focus mode", and select "Toggle focus mode." To exit focus mode, repeat these same steps.

To set focus mode to launch every time you start Windows Terminal, open the **Settings** (`Ctrl` + `,`) and select the **Startup** tab. Under **Launch mode**, select **Focus** (or **Maximized focus**, which is focus mode with your terminal window maximized). Select **Save** before exiting. The next time you launch the Windows Terminal, it will open up in focus mode. To stop Windows Terminal from launching in focus mode, follow these same steps, but select **Default** from the list of **Launch mode** options.

To add a shortcut key (or keybinding) for entering focus mode, open the `settings.json` file (`Ctrl` + `Shift` + `,`). Inside your `settings.json` file, find the [`"actions":`](./customize-settings/actions.md) section and add the following command:

```json
{ "command": "toggleFocusMode", "keys": "ctrl+f12" }
```

Replace "ctrl+f12" with the shortcut / keybinding of your choice, but be sure not to repeat any existing keybindings from the Actions list. You can also see a list of Actions with associated keybindings, and **+ Add new** bindings, in the **Actions** tab of the Windows Terminal **Settings** dashboard. Remember to **Save** after making any changes. You can now toggle focus mode using the "action" shortcut key that you created. (In the case of our example, `Shift` + `F12`).

To learn more about this command, see [`toggleFocusMode`](/windows/terminal/customize-settings/actions#toggle-focus-mode).

## Quake mode

"Quake mode" is the name for the special mode the terminal enters when naming a window `_quake`. When a window is in quake mode:
Expand Down
50 changes: 45 additions & 5 deletions TerminalDocs/tutorials/new-tab-same-directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ title: Opening a tab/pane in the same directory
description: In this tutorial, you learn how to configure your shell to allow Windows Terminal to open tabs in the same path.
author: zadjii-msft
ms.author: migrie
ms.date: 11/18/2021
ms.date: 07/08/2022
ms.topic: tutorial
#Customer intent: As a developer or IT admin, I want to open tabs in the same working directory as my current tab.
---

# Tutorial: Opening a tab/pane in the same directory in Windows Terminal
# Tutorial: Opening a tab or pane in the same directory in Windows Terminal

Typically, the "new tab" and "split pane" actions will always open a new tab/pane in whatever the `startingDirectory` is for that profile. However, on other platforms, it's common for new tabs to automatically use the working directory of the current tab as the starting directory for a new tab. This allows the user to quickly multitask in a single directory.

Expand Down Expand Up @@ -65,7 +65,7 @@ function prompt {

#### PowerShell with posh-git

If you're using posh-git, then that will already modify your prompt. In that case, you'll want to only add the necessary output to the already modified prompt. The following example is a lightly modified version of this example from [the ConEmu docs](https://conemu.github.io/en/ShellWorkDir.html#PowerShellPoshGit):
If you're using [posh-git](https://github.com/dahlbyk/posh-git), then that will already modify your prompt. In that case, you'll want to only add the necessary output to the already modified prompt. The following example is a lightly modified version of this example from [the ConEmu docs](https://conemu.github.io/en/ShellWorkDir.html#PowerShellPoshGit):

```powershell
function prompt
Expand All @@ -84,11 +84,26 @@ function prompt
}
```

#### PowerShell with Starship

If you're using [Starship](http://starship.rs/), then that will already modify your prompt. In that case, you'll want to only add the necessary output to the already modified prompt.

```powershell
function Invoke-Starship-PreCommand {
$loc = $($executionContext.SessionState.Path.CurrentLocation);
$prompt = "$([char]27)]9;12$([char]7)"
if ($loc.Provider.Name -eq "FileSystem")
{
$prompt += "$([char]27)]9;9;`"$($loc.Path)`"$([char]7)"
}
$host.ui.Write($prompt)
}

### WSL

#### `bash`

Add the following line to the end of your `.bashrc` file:
Add the following line to the end of your `.bash_profile` config file:

```bash
PROMPT_COMMAND=${PROMPT_COMMAND:+"$PROMPT_COMMAND; "}'printf "\e]9;9;%s\e\\" "$(wslpath -w "$PWD")"'
Expand All @@ -109,8 +124,33 @@ precmd_functions+=(keep_current_path)

The `precmd_functions` hook tells zsh what commands to run before displaying the prompt. The `printf` statement is what we're using to append the sequence for setting the working directory with the Terminal. The `$(wslpath -w "$PWD")` bit will invoke the `wslpath` executable to convert the current directory into its Windows-like path. Using `precmd_functions+=` make sure we append the `keep_current_path` function to any existing function already defined for this hook.

#### Fish

If you're using [Fish shell](https://fishshell.com/), add the following lines to the end of your config file located at `~/.config/fish/config.fish`:

```bash
function storePathForWindowsTerminal --on-variable PWD
if test -n "$WT_SESSION"
printf "\e]9;9;%s\e\\" (wslpath -w "$PWD")
end
end
```

This function will be called whenever the current path is changed to confirm the current session is opened by Windows Terminal (verifying $WT_SESSION) and sending Operating System Command (OSC 9;9;), with the Windows equivalent path (`wslpath -w`) of current path.

#### MINGW

For MINGW, Git Bash and Cygwin, you need to modify the `PROMT_COMMAND` for WSL: replace `wslpath` with `cygpath`.

Add the following line to the end of your `.bashrc` file:

```bash
PROMPT_COMMAND=${PROMPT_COMMAND:+"$PROMPT_COMMAND; "}'printf "\e]9;9;%s\e\\" "`cygpath -w $PWD`"'
```

> [!NOTE]
> Don't see your favorite shell here? If you figure it out, feel free to open a PR to contribute a solution for your preferred shell!
> Don't see your favorite shell here? If you figure it out, feel free to [open a PR](https://github.com/MicrosoftDocs/terminal/edit/main/TerminalDocs/tutorials/new-tab-same-directory.md)
> to contribute a solution for your preferred shell!

## Using actions to duplicate the path

Expand Down