From 948178c07d1a3baef1e9e274dc10cdbff51408f6 Mon Sep 17 00:00:00 2001 From: Matt Wojciakowski Date: Mon, 12 Sep 2022 15:02:17 -0700 Subject: [PATCH] Merge Main > Live (#580) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matt Wojciakowski Co-authored-by: Mike Griese Co-authored-by: Kayla Cinnamon Co-authored-by: Carlos Zamora Co-authored-by: Philippe Blain Co-authored-by: Shubham Gogna <36936863+shgogna@users.noreply.github.com> Co-authored-by: Alma Jenks Co-authored-by: Jason Howell <5067358+JasonWHowell@users.noreply.github.com> Co-authored-by: Schuyler Rosefield Co-authored-by: Sanam <31341013+sanamhub@users.noreply.github.com> Co-authored-by: Haltarys <45515869+Haltarys@users.noreply.github.com> Co-authored-by: Nikolas Grottendieck Co-authored-by: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Co-authored-by: Shawn Melton <11204251+wsmelton@users.noreply.github.com> Co-authored-by: Alex Buck Co-authored-by: Adrien Clairembault <42734840+AdrienClairembault@users.noreply.github.com> Co-authored-by: Paul "TBBle" Hampson Co-authored-by: Joshua Cook Co-authored-by: Aaron Junker Co-authored-by: Jan De Dobbeleer <2492783+JanDeDobbeleer@users.noreply.github.com> Co-authored-by: Alexey Grigorev Co-authored-by: Tobi <22715034+twobiers@users.noreply.github.com> Co-authored-by: Hans Kilian Co-authored-by: André Costa Co-authored-by: Haroon Ali Shah --- README.md | 6 +++--- TerminalDocs/command-line-arguments.md | 5 ++++- .../custom-terminal-gallery/custom-schemes.md | 2 +- TerminalDocs/faq.yml | 4 ++++ TerminalDocs/tutorials/custom-prompt-setup.md | 12 +++++++++++- TerminalDocs/tutorials/new-tab-same-directory.md | 3 +++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9dd97ac0..d9e9fe2a 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ ## Welcome to the Windows Terminal Documentation Source Code -This repository contains the source code (primarily written in markdown) for Windows Terminal documentation. Find the live documentation at: https://docs.microsoft.com/windows/terminal/ +This repository contains the source code (primarily written in markdown) for Windows Terminal documentation. Find the live content at [Windows Terminal documentation](https://docs.microsoft.com/windows/terminal/). -To contribute to these docs, select the "Edit" link found on each of the live docs pages to open the source code file for that page. For a [markdown authoring reference](https://docs.microsoft.com/contribute/markdown-reference) and additional help on how to contribute, visit the [Microsoft docs contributor guide](https://docs.microsoft.com/contribute/). +To contribute to these docs, select the "Edit" link found on each of the live docs pages to open the source code file for that page. For a [markdown authoring reference](https://docs.microsoft.com/contribute/markdown-reference) and additional help on how to contribute, visit our [contributor guide](https://docs.microsoft.com/contribute/). To file an issue with the documentation, use the feedback link at the bottom of the live docs page or select the "Issues" tab above. Please first search existing issues to see whether your issue is already being addressed. ## Where do I file product issues? -To [file an issue](https://github.com/microsoft/terminal/issues) or [contribute to](https://github.com/microsoft/terminal/pulls) the actual Windows Terminal product, please visit the [Windows Terminal product repo](https://github.com/microsoft/terminal). +To [file an issue](https://github.com/microsoft/terminal/issues) or [contribute to](https://github.com/microsoft/terminal/pulls) the actual Windows Terminal product, please visit the [Windows Terminal product repo](https://github.com/microsoft/terminal). **Thank you for your contributions!!!** diff --git a/TerminalDocs/command-line-arguments.md b/TerminalDocs/command-line-arguments.md index b0909312..d25c98cc 100644 --- a/TerminalDocs/command-line-arguments.md +++ b/TerminalDocs/command-line-arguments.md @@ -18,12 +18,15 @@ You can use `wt.exe` to open a new instance of Windows Terminal from the command ## Command line syntax -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. +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-window` by default. ```cmd wt [options] [command ; ] ``` +> [!NOTE] +> The behavior of the `wt.exe` command may be affected by the [`windowingBehavior` property](./customize-settings/startup.md#new-instance-behavior). This setting can be adjusted to default between opening a new window or opening a new tab. + To display a help message listing the available command line arguments, enter: `wt -h`, `wt --help`, `wt -?`, or `wt /?`. ## Options and commands diff --git a/TerminalDocs/custom-terminal-gallery/custom-schemes.md b/TerminalDocs/custom-terminal-gallery/custom-schemes.md index 354825c9..717808fc 100644 --- a/TerminalDocs/custom-terminal-gallery/custom-schemes.md +++ b/TerminalDocs/custom-terminal-gallery/custom-schemes.md @@ -18,7 +18,7 @@ Copy the JSON from the **"schemes"** section into the correct section in [settin Before: ```json -"schemes:" [], +"schemes": [], ``` After: diff --git a/TerminalDocs/faq.yml b/TerminalDocs/faq.yml index a845f5b8..786b346a 100644 --- a/TerminalDocs/faq.yml +++ b/TerminalDocs/faq.yml @@ -35,6 +35,10 @@ sections: answer: | Windows Terminal will support any command line or shell that you have on your machine, including those that are included with Windows like PowerShell or Windows Command Prompt (cmd.exe), as well as any Linux distribution that can be installed with [WSL](/windows/wsl/), Azure Cloud Shell, Git Bash, etc. The terminal will automatically detect when you've installed a Linux distribution with WSL and create a profile for you. It can also save your Azure credentials, so you can quickly log in quickly to Azure Cloud Shell. + - question: What is the difference between a shell and a terminal? + answer: | + Windows Terminal is basically a host that enables you to run multiple command-line apps or shells side-by-side in customizable environment using tabs or window panes. Examples of "shell" applications include `cmd.exe` (the traditional Windows Command Prompt), `powershell`, or `zsh`. These are text-only applications that provide streams of characters and don't care about how they are rendered to the user. They are also sometimes referred to as "command-line client" applications. On the other hand, "terminal" applications, like Windows Terminal, gnome-terminal, xterm, iterm2, or hyper, are all graphical applications that can be used to render the output of command-line clients, customizing things like font, text size, colors, etc. On Windows, if you run `cmd.exe`, the operating system will create an instance of `conhost.exe` as the "terminal" for displaying the `cmd.exe` command-line client. The same thing happens for PowerShell, the system creates a new conhost window for any client not already connected to a terminal of some kind. Any terminal can run any command-line client application, so Windows Terminal can run any shell you prefer, such as Bash using Windows Subsystem for Linux (WSL). + - question: How can I manually add a shell? answer: | In your [settings.json file](./install.md#settings-json-file), you can create or modify profiles that run any command-line executable. In the settings.json file, set "commandline" to whatever you want. For example, powershell --> "pwsh.exe". diff --git a/TerminalDocs/tutorials/custom-prompt-setup.md b/TerminalDocs/tutorials/custom-prompt-setup.md index f2f24e5b..295461b7 100644 --- a/TerminalDocs/tutorials/custom-prompt-setup.md +++ b/TerminalDocs/tutorials/custom-prompt-setup.md @@ -57,9 +57,16 @@ You will need to agree to the source terms and may run into the instance that mo ![Screenshot of winget install oh my posh packages.](../images/oh-my-posh-winget.png) -To ensure you have the latest updates, you can use the following command: `winget upgrade oh-my-posh`. +To use the Microsoft Store version of Oh My Posh, which will automatically update when new versions are available, use the command: + +```powershell +winget install XP8K0HKJFRXGCK +``` + +Enter `oh-my-posh --version` to confirm the version number of your Oh My Posh installation. To ensure you have the latest updates, you can use the following command: `winget upgrade oh-my-posh`. > [!NOTE] +> If you want to install the newest version of Oh My Posh in PowerShell, you may want to first remove the OMP module's cached files and uninstall the old module. There are instructions on how to do this in the [Oh My Posh docs](https://ohmyposh.dev/docs/migrating#migration-steps). > If you are more familiar with the [Scoop](https://scoop.sh/) installer or a manual installation method that allows automation, these can also be used for installing on Windows, just follow the instructions in the [Oh My Posh docs](https://ohmyposh.dev/docs/installation/windows). ### Choose and apply a PowerShell prompt theme @@ -83,6 +90,9 @@ Now, each new PowerShell instance will start by importing Oh My Posh and setting > [!NOTE] > 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). +> [!TIP] +> Oh My Posh can be configured to restore the current working directory by enabling `osc99` in the General Settings. See the [Oh My Posh docs](https://ohmyposh.dev/docs/configuration/overview#general-settings). + ## Customize your WSL prompt with Oh My Posh Oh My Posh now allows you to customize WSL prompts, just like you would a PowerShell prompt using [built-in themes](https://ohmyposh.dev/docs/themes). diff --git a/TerminalDocs/tutorials/new-tab-same-directory.md b/TerminalDocs/tutorials/new-tab-same-directory.md index 35d79ac2..71029720 100644 --- a/TerminalDocs/tutorials/new-tab-same-directory.md +++ b/TerminalDocs/tutorials/new-tab-same-directory.md @@ -98,9 +98,12 @@ function Invoke-Starship-PreCommand { } $host.ui.Write($prompt) } +``` ### WSL +Windows Subsystem for Linux distributions primarily use BASH as the command line shell. + #### `bash` Add the following line to the end of your `.bash_profile` config file: