diff --git a/TerminalDocs/command-line-arguments.md b/TerminalDocs/command-line-arguments.md index f81cac9d..4bf89d88 100644 --- a/TerminalDocs/command-line-arguments.md +++ b/TerminalDocs/command-line-arguments.md @@ -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: 04/14/2021 +ms.date: 05/25/2021 ms.topic: how-to --- @@ -55,6 +55,22 @@ Below is the full list of supported commands and options for the `wt` command li Commands may vary slightly depending on which command line you're using. +### Passing an argument to the default shell + +To start an instance of Windows Terminal and have it execute a command, call `wt.exe` followed by your command. + +Here's an example of calling Windows Terminal to pass a [ping](/windows-server/administration/windows-commands/ping) command argument to echo an IP address: + +```powershell +wt ping docs.microsoft.com +``` + +Here's an example of calling Windows Terminal to open a new tab with a PowerShell command line, confirming to call the [Start-Service](/powershell/module/microsoft.powershell.management/start-service) command, and opening another new tab with Windows Command Prompt open to the `/k` directory: + +```cmd +wt new-tab PowerShell -c Start-Service ; new-tab cmd /k dir +``` + ### Target a specific window > [!IMPORTANT] @@ -322,7 +338,7 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr --- -### Using application title ([Preview](https://aka.ms/terminal-preview)) +### Using application title 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: @@ -350,9 +366,6 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr --- -> [!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: @@ -387,7 +400,7 @@ 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)) +### Color scheme 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. @@ -415,9 +428,6 @@ Execution aliases do not work in WSL distributions. If you want to use wt.exe fr --- -> [!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: diff --git a/TerminalDocs/customize-settings/actions.md b/TerminalDocs/customize-settings/actions.md index 6f27ae7f..5ff36024 100644 --- a/TerminalDocs/customize-settings/actions.md +++ b/TerminalDocs/customize-settings/actions.md @@ -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: 04/14/2021 +ms.date: 05/25/2021 ms.topic: how-to ms.localizationpriority: high --- @@ -111,10 +111,10 @@ ___ ### Modifiers -`ctrl+`, `shift+`, `alt+` +`ctrl+`, `shift+`, `alt+`, `win+` > [!NOTE] -> The `Windows` key is not supported as a modifier. +> While the `Windows` key is supported as a modifier, the system reserves most `win+` key bindings. If the OS has reserved that key binding, the terminal will never receive that binding. ### Modifier keys @@ -198,14 +198,16 @@ This opens the dropdown menu. ### Open settings files -This opens either the default or custom settings files. Without the `target` field, this will open the settings.json file. +This opens either the settings UI, custom settings file (`settings.json`), or default settings file (`defaults.json`), depending on the `target` field. +Without the `target` field, the custom settings file will be opened. **Command name:** `openSettings` **Default bindings:** ```json -{ "command": "openSettings", "keys": "ctrl+," }, +{ "command": { "action": "openSettings", "target": "settingsUI" }, "keys": "ctrl+," }, +{ "command": { "action": "openSettings", "target": "settingsFile" }, "keys": "ctrl+shift+," }, { "command": { "action": "openSettings", "target": "defaultsFile" }, "keys": "ctrl+alt+," }, ``` @@ -215,9 +217,6 @@ This opens either the default or custom settings files. Without the `target` fie | ---- | --------- | ------- | ----------- | | `target` | Optional | `"settingsFile"`, `"defaultsFile"`, `"settingsUI"`, `"allFiles"` | The settings file to open. | -> [!IMPORTANT] -> The `"settingsUI"` value for `target` is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). - ### Toggle full screen This allows you to switch between full screen and default window sizes. @@ -372,10 +371,6 @@ This creates a new tab. Without any arguments, this will open the default profil | `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 This opens the tab to the right of the current one. @@ -394,9 +389,6 @@ This opens the tab to the right of the current one. | ---- | --------- | ------- | ----------- | | `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. @@ -415,9 +407,6 @@ This opens the tab to the left of the current one. | ---- | --------- | ------- | ----------- | | `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::: @@ -590,10 +579,7 @@ This creates a new window. Without any arguments, this will open the default pro | `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)) +### Rename window This command can be used to rename a window to a specific string. @@ -617,8 +603,43 @@ _This command is not currently bound in the default settings_. | ---- | --------- | ------- | ----------- | | `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 + +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" } +``` + +### Identify window + +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": "" }, +``` + +### Identify windows + +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" }, +``` ### Open window rename dialog ([Preview](https://aka.ms/terminal-preview)) @@ -668,6 +689,7 @@ _This command is not currently bound in the default settings_. > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
+ ___ ## Pane management commands @@ -1008,6 +1030,128 @@ Changes the active color scheme. ___ +## Global commands + +### Global summon ([Preview](https://aka.ms/terminal-preview)) + +This is a special action that works globally in the OS, rather than only in the context of the terminal window. When pressed, this action will summon the terminal window. Which window is summoned, where the window is summoned to, and how the window behaves when summoning it, is controlled by the properties on this action. + +**Notes** +* Any keys bound to `globalSummon` actions in the terminal will not work in other applications while the terminal is running - they will always focus the terminal window. + +* If another running application already registered for the given `keys` using the `RegisterHotKey` API, the terminal will be unable to listen for those key strokes. + +* Elevated and unelevated instances of the terminal will not be able to both register for the same keys. The same applies to both Preview and Stable versions of the terminal - the first one to be launched will always win. + +* These key strokes will only work when an instance of the terminal is already running. To launch the terminal automatically on login, see [`startOnUserLogin`](./startup.md#launch-on-machine-startup). + +**Command name:** `globalSummon` + +**Default binding:** + +_This command is not currently bound in the default settings_. + +```json +{ "keys": "", "command": { "action": "globalSummon" } } +``` + +#### Arguments + +| Name | Necessity | Accepts | Description | +| ---- | --------- | ------- | ----------- | +| `desktop` | Optional | `any`, `toCurrent`, `onCurrent` | This controls how the terminal should interact with virtual desktops. | +| `monitor` | Optional | `any`, `toCurrent`, `toMouse` | This controls the monitor that the window will be summoned from/to. | +| `name` | Optional | String | When omitted (_default_), use `monitor` and `desktop` to find the appropriate most-recently-used window to summon. When provided, summon the window whose name or ID matches the given `name` value. If no such window exists, then create a new window with that name. | +| `dropdownDuration` | Optional | Integer | Defaults to `0`. When provided with a positive number, "slide" the window in from the top of the screen using an animation that lasts `dropdownDuration` milliseconds. `200` is a reasonable value for this setting. | +| `toggleVisibility` | Optional | `true`, `false` | Defaults to `true`. When `true`, pressing the assigned keys for this action will dismiss (minimize) the window when the window is currently the foreground window. When `false`, pressing the assigned keys will only ever bring the window to the foreground. | + +When `name` is provided _with_ `monitor` or `desktop`, `name` behaves in the following +ways: + * `desktop` + - `"any"`: Go to the desktop the given window is already on. + - `"toCurrent"`: If the window is on another virtual desktop, then move it to the currently active one. + - `"onCurrent"`: If the window is on another virtual desktop, then move it to the currently active one. + * `monitor` + - `"any"`: Leave the window on the monitor it is already on. + - `"toCurrent"`: If the window is on another monitor, then move it to the monitor with the current foreground window. + - `"toMouse"`: If the window is on another monitor, then move it to the monitor with the mouse cursor on it. + +The `desktop` and `monitor` properties can be combined in the following ways: + +| | `"desktop"` | | | +| -- | --------- | -- | -- | +| **`"monitor"`** | `"any"`
**Leave where it is** | `"toCurrent"`
**Move to current desktop** | `"onCurrent"`
**On current desktop only** | +| `"any"`
**Summon the MRU window** | Go to the desktop the window is on (leave position alone) | Move the window to this desktop (leave position alone) | If there isn't one on this desktop:Else: | +| `"toCurrent"`
**Summon the MRU window TO the monitor with the foreground window** | Go to the desktop the window is on, move to the monitor with the foreground window | Move the window to this desktop, move to the monitor with the foreground window | If there isn't one on this desktop:Else: | +| `"toMouse"`
**Summon the MRU window TO the monitor with the mouse** | Go to the desktop the window is on, move to the monitor with the mouse | Move the window to this desktop, move to the monitor with the mouse | If there isn't one on this desktop:Else: | + +#### Examples + +```jsonc + +// Summon the most recently used (MRU) window, to the current virtual desktop, +// to the monitor the mouse cursor is on, without an animation. If the window is +// already in the foreground, then minimize it. +{ "keys": "ctrl+1", "command": { "action": "globalSummon" } }, + +// Summon the MRU window, by going to the virtual desktop the window is +// currently on. Move the window to the monitor the mouse is on. +{ "keys": "ctrl+2", "command": { "action": "globalSummon", "desktop": "any" } }, + +// Summon the MRU window to the current desktop, leaving the position of the window untouched. +{ "keys": "ctrl+3", "command": { "action": "globalSummon", "monitor": "any" } }, + +// Summon the MRU window, by going to the virtual desktop the window is +// currently on, leaving the position of the window untouched. +{ "keys": "ctrl+4", "command": { "action": "globalSummon", "desktop": "any", "monitor": "any" } }, + +// Summon the MRU window with a dropdown duration of 200ms. +{ "keys": "ctrl+5", "command": { "action": "globalSummon", "dropdownDuration": 200 } }, + +// Summon the MRU window. If the window is already in the foreground, do nothing. +{ "keys": "ctrl+6", "command": { "action": "globalSummon", "toggleVisibility": false } }, + +// Summon the window named "_quake". If no window with that name exists, then create a new window. +{ "keys": "ctrl+7", "command": { "action": "globalSummon", "name": "_quake" } } +``` + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +### Open the quake mode window ([Preview](https://aka.ms/terminal-preview)) + +:::row::: +:::column span=""::: +This action is a special variation of the [`globalSummon`](#global-commands) action. It specifically summons the [quake window](../tips-and-tricks.md#quake-mode). It is a shorthand for the following `globalSummon` action: + +```json +{ "keys": "win+`", "command": { "action": "globalSummon", "name": "_quake", "dropdownDuration": 200, "toggleVisibility": true, "monitor": "toCursor", "desktop": "toCurrent" } } +``` + +If you'd like to change the behavior of the `quakeMode` action, we recommended creating a new `globalSummon` entry in `actions` with the settings you prefer. + +**Command name:** `quakeMode` + +**Default binding:** + +```json +{ "keys": "win+`", "command": { "action": "quakeMode" } } +``` + +:::column-end::: +:::column span=""::: +![Windows Terminal quake mode](./../images/quake-mode.gif) + +:::column-end::: +:::row-end::: + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +
+ +___ + ## Unbind keys This unbinds the associated keys from any command. diff --git a/TerminalDocs/customize-settings/interaction.md b/TerminalDocs/customize-settings/interaction.md index 0fe5aadb..f77aeab8 100644 --- a/TerminalDocs/customize-settings/interaction.md +++ b/TerminalDocs/customize-settings/interaction.md @@ -3,7 +3,7 @@ title: Windows Terminal Interaction Settings description: Learn how to customize interaction settings within Windows Terminal. author: cinnamon-msft ms.author: cinnamon -ms.date: 04/14/2021 +ms.date: 05/25/2021 ms.topic: how-to ms.localizationpriority: high --- @@ -44,6 +44,25 @@ When this is set to `true`, the color and font formatting of the selected text i ___ +## Remove trailing white-space in rectangular selection ([Preview](https://aka.ms/terminal-preview)) + +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 Alt key, right-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` + +**Necessity:** Optional + +**Accepts:** `true`, `false` + +**Default value:** `false` + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +
+ +___ + ## Word delimiters This determines the word delimiters used in a double-click selection. Word delimiters are characters that specify where the boundary is between two words. The most common examples are spaces, semicolons, commas, and periods. @@ -153,6 +172,25 @@ When this is set to `true`, the terminal will move focus to the pane on mouse ho ___ +## Automatically detect URLs and make them clickable ([Preview](https://aka.ms/terminal-preview)) + +When this is set to `true`, URLs will be detected by the terminal. This will cause URLs to underline on hover and be clickable by pressing Ctrl. This is an experimental feature and its continued existence is not guaranteed. + +**Property name:** `experimental.detectURLs` + +**Necessity:** Optional + +**Accepts:** `true`, `false` + +**Default value:** `true` + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +
+ +___ + ## Paste warnings ### Warn when the text to paste is very large diff --git a/TerminalDocs/customize-settings/profile-appearance.md b/TerminalDocs/customize-settings/profile-appearance.md index 6ba22e7f..a4c702bb 100644 --- a/TerminalDocs/customize-settings/profile-appearance.md +++ b/TerminalDocs/customize-settings/profile-appearance.md @@ -3,7 +3,7 @@ title: Windows Terminal Appearance Profile Settings description: Learn how to customize the appearance profile settings within Windows Terminal. author: cinnamon-msft ms.author: cinnamon -ms.date: 04/14/2021 +ms.date: 05/25/2021 ms.topic: how-to ms.localizationpriority: high --- @@ -349,8 +349,6 @@ ___ ## Unfocused appearance settings -### Unfocused appearance settings ([Preview](https://aka.ms/terminal-preview)) - An object you can add to a profile that applies settings to the profile when it is unfocused. This setting only accepts appearance settings. **Property name:** `unfocusedAppearance` @@ -368,9 +366,6 @@ An object you can add to a profile that applies settings to the profile when it }, ``` -> [!IMPORTANT] -> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). -
___ diff --git a/TerminalDocs/customize-settings/startup.md b/TerminalDocs/customize-settings/startup.md index 72d879c0..e65ce3d1 100644 --- a/TerminalDocs/customize-settings/startup.md +++ b/TerminalDocs/customize-settings/startup.md @@ -3,7 +3,7 @@ title: Windows Terminal Startup Settings description: Learn how to customize startup settings within Windows Terminal. author: cinnamon-msft ms.author: cinnamon -ms.date: 04/14/2021 +ms.date: 05/25/2021 ms.topic: how-to ms.localizationpriority: high --- @@ -28,6 +28,25 @@ Set the default profile that opens by typing ctrl+shift+t, typing the ___ +## Default terminal application ([Preview](https://aka.ms/terminal-preview)) + +Set the default terminal emulator in Windows for all command line applications to run inside of. + +**Property name:** This modifies an OS setting and does not have a property name inside the settings.json file. + +**Necessity:** Required + +**Accepts:** Any terminal emulator that appears in the dropdown + +**Default value:** Windows Console Host + +> [!IMPORTANT] +> This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview). + +
+ +___ + ## Launch on machine startup When set to `true`, this enables the launch of Windows Terminal at startup. Setting this to `false` will disable the startup task entry. diff --git a/TerminalDocs/images/quake-mode.gif b/TerminalDocs/images/quake-mode.gif new file mode 100644 index 00000000..46e1a213 Binary files /dev/null and b/TerminalDocs/images/quake-mode.gif differ diff --git a/TerminalDocs/tips-and-tricks.md b/TerminalDocs/tips-and-tricks.md index b3302dee..470d54f3 100644 --- a/TerminalDocs/tips-and-tricks.md +++ b/TerminalDocs/tips-and-tricks.md @@ -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: 07/21/2020 +ms.date: 05/25/2021 ms.topic: how-to ms.localizationpriority: high --- @@ -28,10 +28,53 @@ You can right click on a tab and select Color... to color the tab for that termi > [!NOTE] > While it is possible to [set the tab title from the commandline](./tutorials/tab-title.md) with escape sequences, it currently isn't possible to set the tab color in this way. -## Zoom with the mouse +## Mouse interaction -You can zoom the text window of Windows Terminal by holding ctrl and scrolling. The zoom will persist for that terminal session. If you want to change your font size, you can learn more about the font size feature on the [Profile - Appearance page](./customize-settings/profile-appearance.md#text). +There are several ways to interact with Windows Terminal using a mouse. -## Adjust background opacity with the mouse +### Zoom with the mouse + +You can zoom the text window of Windows Terminal (making the text size larger or smaller) by holding ctrl and scrolling. The zoom will persist for that terminal session. If you want to change your font size, you can learn more about the font size feature on the [Profile - Appearance page](./customize-settings/profile-appearance.md#text). + +### Adjust background opacity with the mouse You can adjust the opacity of the background by holding ctrl+shift and scrolling. The opacity will persist for that terminal session. If you want to change your acrylic opacity for a profile, you can learn more about acrylic background effects on the [Profile - Appearance page](./customize-settings/profile-appearance.md#acrylic). + +### Open a hyperlink + +You can open a hyperlink from inside Windows Terminal with your mouse using ctrl + click. + +### Copy/paste + +You can right-click with your mouse to copy and paste text within Windows Terminal using your clipboard storage. + +Windows Terminal also includes a **[copyOnSelect](./customize-settings/interaction.md#automatically-copy-selection-to-clipboard)** setting that can be set to `true` in order for any text selected with your mouse to be immediately copied to your clipboard. The right-click on your mouse will always paste in this case. + +### Virtual Terminal and WSL mouse support + +Windows Terminal supports mouse input in Windows Subsystem for Linux (WSL) applications as well as Windows applications that use virtual terminal (VT) input. This means applications such as [tmux](https://github.com/tmux/tmux/wiki) and [Midnight Commander](https://www.linuxhelp.com/how-to-install-midnight-commander-in-linux) will recognize when you select items in the Terminal window. If an application is in mouse mode, you can hold down shift to make a selection instead of sending VT input. + +## 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: + +* The terminal is automatically snapped to the top half of the monitor. + +* The window can no longer be resized horizontally or from the top. It can only be resized on the bottom. + +* The window automatically enters focus mode (note that you may have multiple tabs in focus mode). + +* When [`windowingBehavior`](./customize-settings/startup.md#new-instance-behavior) is set to `"useExisting"` or `"useAnyExisting"`, they will ignore the existence of the `_quake` window. + +* The window will be hidden from the taskbar and from Alt+Tab. + +* Only one window may be the quake mode window at a time. + +The quake mode window can be created either by binding the `quakeMode` action, or by manually running the command line: + +``` +wt -w _quake +``` + +> [!NOTE] +> If you don't have a [`quakeMode`](./customize-settings/actions.md#global-commands) action bound and minimize the quake window, you'll need to go into Task Manager to be able to exit that terminal window! diff --git a/TerminalDocs/tutorials/powerline-setup.md b/TerminalDocs/tutorials/powerline-setup.md index ae34cefc..e266ce86 100644 --- a/TerminalDocs/tutorials/powerline-setup.md +++ b/TerminalDocs/tutorials/powerline-setup.md @@ -3,7 +3,7 @@ title: Windows Terminal Powerline Setup description: In this tutorial, you learn how to set up Powerline in Windows Terminal. author: cinnamon-msft ms.author: cinnamon -ms.date: 02/25/2021 +ms.date: 05/25/2021 ms.topic: tutorial #Customer intent: As a developer or IT admin, I want to set up Powerline in my Windows Terminal so that I can have a customized command line experience. --- @@ -44,7 +44,7 @@ Install-Module oh-my-posh -Scope CurrentUser ``` > [!TIP] -> You may need to install NuGet if you don't already have it. Your PowerShell command line will ask if you want to install NuGet if this is the case. Select [Y] Yes. You may also need to approve that you are installing modules from [PSGallery](https://docs.microsoft.com/powershell/scripting/gallery/getting-started), an 'untrusted repository'. Select [Y] Yes. +> You may need to install NuGet if you don't already have it. Your PowerShell command line will ask if you want to install NuGet if this is the case. Select [Y] Yes. You may also need to approve that you are installing modules from [PSGallery](/powershell/scripting/gallery/getting-started), an 'untrusted repository'. Select [Y] Yes. [Posh-Git](https://github.com/dahlbyk/posh-git) adds Git status information to your prompt as well as tab-completion for Git commands, parameters, remotes, and branch names. [Oh-My-Posh](https://github.com/JanDeDobbeleer/oh-my-posh) provides theme capabilities for your PowerShell prompt. @@ -54,11 +54,11 @@ If you are using PowerShell Core, install PSReadline: Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck ``` -[PSReadline](https://docs.microsoft.com/powershell/module/psreadline) lets you customize the command line editing environment in PowerShell. +[PSReadline](/powershell/module/psreadline) lets you customize the command line editing environment in PowerShell. ### Customize your PowerShell prompt -Open your PowerShell profile with `notepad $PROFILE` or the text editor of your choice. This is not your Windows Terminal profile. Your PowerShell profile is a script that runs every time PowerShell starts. [Learn more about PowerShell profiles](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles). +Open your PowerShell profile with `notepad $PROFILE` or the text editor of your choice. This is not your Windows Terminal profile. Your PowerShell profile is a script that runs every time PowerShell starts. [Learn more about PowerShell profiles](/powershell/module/microsoft.powershell.core/about/about_profiles). In your PowerShell profile, add the following to the end of the file: @@ -72,7 +72,7 @@ Now, each new instance starts by importing Posh-Git and Oh-My-Posh, then setting function without the need for additional icons. You can also [create a custom theme](https://ohmyposh.dev/docs/installation#change-the-theme) to match the font of your choice. > [!IMPORTANT] -> Script execution policy must be set to either **RemoteSigned** or **Unrestricted** in order for the profile script to run. Run this command to see your current execution policy `Get-ExecutionPolicy`. [Learn more about Execution Policies](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies) +> Script execution policy must be set to either **RemoteSigned** or **Unrestricted** in order for the profile script to run. Run this command to see your current execution policy `Get-ExecutionPolicy`. [Learn more about Execution Policies](/powershell/module/microsoft.powershell.core/about/about_execution_policies) ### Set Cascadia Code PL as your font @@ -109,7 +109,7 @@ wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh- chmod +x /usr/local/bin/oh-my-posh ``` -The second step is optonal. Oh-my-posh can use the same theme config regardless of the shell or evironment, so if you're already using +The second step is optional. Oh-my-posh can use the same theme config regardless of the shell or evironment, so if you're already using it on Windows Powershell for example, you can reuse that theme configuration rather than download the themes. If you plan to use it within Ubuntu WSL only, fetch the [themes](https://ohmyposh.dev/docs/themes) so you can get started right away: diff --git a/TerminalDocs/tutorials/ssh.md b/TerminalDocs/tutorials/ssh.md index 5b5c4adf..eba36e3a 100644 --- a/TerminalDocs/tutorials/ssh.md +++ b/TerminalDocs/tutorials/ssh.md @@ -21,7 +21,7 @@ You can start an SSH session in your command prompt by executing `ssh user@machi ```json { "name": "user@machine ssh profile", - "commandline": "ssh user@machine", + "commandline": "ssh user@machine" } ```