Windows Terminal Preview 1.19 Release

The Windows Terminal team is back with a new preview release! Windows Terminal Preview 1.19 introduces new features such as Broadcast Input, Web Search, the Suggestions UI and more!

We are also updating Windows Terminal to version 1.18 which will include all of the features from this previous blog post. As always, you can install Windows Terminal and Windows Terminal Preview from the Microsoft Store, from the GitHub releases page, or by using winget.

Let’s talk about these new Windows Terminal Preview 1.19 features and how to set them up!

Broadcast Input​


Broadcast Input allows the contents of one terminal pane to be broadcasted to all the other panes in a tab. To turn on Broadcast Input, select “Toggle broadcast input to all panes” in the Command Palette. You can also set Broadcast Input as a keybinding action as well.

We would like to extend a huge thanks to our community members for bringing this feature request to our attention!

BroadcastInput.gif

Web Search​


Web Search has been added as an option to our right click context menu. Web Search allows a user to do a web search on selected text in their terminal. Shoutout to @mpela81 for this community contribution!

To enable the right-click context menu, add the following defaults object to profiles in your settings.json file:

Code:
    "profiles": 
    {
        "defaults": 
        {
            "experimental.rightClickContextMenu": true
        },
        ...

If you highlight and right-click on text, you will be able to do a web search on that highlighted text by clicking “Web Search” in the right-click context menu. This will open up a browser window (or new tab if you have an existing browser window open) with your web search results.

WebSearch.gif

By default, Web Search will do a search on Bing. If you want Web Search to query another URL, then add "searchWebDefaultQueryUrl" to your settings.json file as a global variable and set it to different URL. Below is the default value for this setting as an example:

Code:
"searchWebDefaultQueryUrl": "https://www.bing.com/search?q=%22%s%22"

This feature is also available as a webSearch action. You can customize this action to launch any search engine by specifying the queryUrl. %s will be replaced with your query.

2728.png Emoji Support in Command Prompt 2728.png


That’s right! You are now able to input emojis in your Command Prompt 2764.png

Don’t believe me? Throw some emojis in your Command Prompt and find out 1f609.png

EmojiCommandPrompt.png

Unfocused Acrylic​


We now have unfocused acrylic support! This means that unfocused windows of Windows Terminal will appear acrylic instead of opaque. Thank you @Jaswir for this community contribution!

Here is a GIF of unfocused acrylic in action!

UnfocusedAcrylic.gif

Here’s a snippet of the JSON used for these settings:

Code:
"opacity": 85,
"useAcrylic": true

Suggestions UI​


The Suggestions UI is a new UI element that provides different types of text suggestions to the user. These suggestions can be anything from command history, saved commands, and more!

This Suggestions UI requires Shell Integration to be enabled in the terminal.

Enabling Shell Integration​


Enabling Shell Integration is a two-step process.

1) Enable shell integration marks in settings.json file.

2) Edit your prompt to make sure the terminal gets told about the CWD and mark up the prompt with appropriate marks. This is done differently in PowerShell and Command Prompt.

For more information on enabling shell integration, check out our tutorial on enabling shell integration.

Using Command History in the Suggestions UI​


Once you have enabled Shell Integration, you will want to create a new showSuggestions action that will show the Suggestions UI with your command history as its suggestions source. This should be done in your settings.json file in actions. Here is an example:

Code:
    "actions": 
    [
        {
            "command": 
            {
                "action": "showSuggestions",
                "source": "commandHistory",
                "useCommandline": true
            },
            "keys": "ctrl+h"
        }
    ],

In this example, we have created a new action that allows us to show the Suggestions UI and populate suggestions based on the our command history. This action uses the Ctrl+H keybinding but feel free to change it to use whatever keybinding you want!

And here is the result! In this image, you will see the Suggestions UI pop up with the commands that I just ran (ls and git status)

SuggestionsUIHistory.png

Using SendInput Actions in the Suggestions UI​


Do you like writing out long commands and having to remember every single argument and flag for them? Because I don’t 1f643.png

Luckily, the Suggestions UI can also use sendInput actions as a suggestions source. A sendInput action is an action that sends text input to the shell. If we create a bunch of sendInput actions for our favorite commands, then we will no longer need to type them out every time we use them.

To enable the Suggestions UI to use your command history and your sendInput actions as a suggestions source, actions in your settings.json file should look like this.

Code:
        {
            "command": 
            {
                "action": "showSuggestions",
                "source": "all",
                "useCommandline": true
            },
            "keys": "ctrl+y"
        },

In this example, we have created a new showSuggestions action that allows use all the suggestion sources available to the Suggestions UI including command history and our sendInput actions. This action uses the Ctrl+Y keybinding but feel free to change it to use whatever keybinding you want!

Of course, we will need some sendInput actions for our Suggestions UI. In the example below, I added some sendInput actions for git scenarios in my settings.json under the showSuggestions action:

Code:
"actions": 
    [
        {
            "command": 
            {
                "action": "showSuggestions",
                "source": "all",
                "useCommandline": true
            },
            "keys": "ctrl+y"
        },
        {
            "command": 
            {
                "action": "sendInput",
                "input": "git commit -m \"\"\u001b[D"
            },
            "name": "commit"
        },
        {
            "command": 
            {
                "action": "sendInput",
                "input": "git checkout -b"
            },
            "name": "new branch"
        },
        {
            "command": 
            {
                "action": "sendInput",
                "input": "git fetch & git pull\r"
            },
            "name": "fetch&pull"
        },
        {
            "command": 
            {
                "action": "sendInput",
                "input": "git merge origin/main\r"
            },
            "name": "merge main"
        },
        {
            "command": 
            {
                "action": "sendInput",
                "input": "git log -10 --pretty=oneline --abbrev-commit\r"
            },
            "name": "log -10"
        }
    ],

The above will allow your Suggestions UI to use your command history and those sendInput actions as a suggestion source:

SuggestionsUI.gif

Experimental Shell Completion Menu​


The Suggestions UI can also surface suggestions from Predictors in PowerShell 7. This will require an additional bit of work for setup. You will need to first modify your PowerShell profile with a shell completion protocol and add a few things to your settings.json file.

We are currently iterating on different shell completion protocols to allow users to enable this feature easier. For more information on how to set this feature up, please check out the Wiki on Experimental Shell Completion Menu in our GitHub repository.

PSSuggestionsUI.gif

If you want to get up-to-date information or participate in the discussions of how we are working to improve this experience, then please check out this feature request on our GitHub repository.

Usability Updates​


26a1.png We will now display an indicator in the tab of any disconnected/closed/crashed application. You can right-click the tab to restart it! (Thanks @mpela81!)

26a1.png The number of search results and positions of hits are now shown in the scrollbar (thanks @Don-Vito! and @zadjii-msft!)

26a1.png Added a --appendCommandLine flag for appending to a command (thanks @hanpuliu-charles!)

26a1.png Scroll marks can be cleared by clear, cls, Clear-Host, and other clear buffer actions!

26a1.png Added an option to default to show an icon in tab, hide tabicon, or make an icon in the tab monochrome (thanks @bundgaard!)

26a1.png Added support for Erase Color Mode (thanks @j4james!)

26a1.png Users can now use an action to display a toast containing the Terminal’s “virtual” CWD.

26a1.png Allow inheriting env vars from wt again and added other env var changes.

26a1.png Added an experimental experimental.moveCursorWithMouse setting for moving the cursor with the mouse. This requires Shell Integration to be enabled.

26a1.png Added support for setting the window frame color with $theme.window.frame, .unfocusedFrame, and experimental.rainbowFrame (I HIGHLY recommend trying out the 1f308.pngexperimental.rainbowFrame1f308.png setting!)

Performance Improvements​


1f525.png We rewrote COOKED_READ_DATA to improve Windows Terminal performance.

1f525.png We rewrote resize with reflow (TextBuffer::Reflow) so it’s faster and more correct.

1f525.png Reduced GdiEngine input latency.

1f525.png Reduced the cost of resetting row attributes.

1f525.png The text buffer is now vectorized committed on demand and faster than before.

1f525.png The whole Settings UI library will only load when you open the Settings UI. This change saves memory.

Miscellaneous Improvements​


1f6e0.png Added support for ITU’s T.416 – ODA SGR (38/48) sequence (thanks again @tusharsnx!)

1f6e0.png You can now copy text without dismissing the text selection by setting dismissSelection to false (thanks @gonzalo-garcian!)

1f6e0.png Improved Run-Test.ps1‘s maintainability and readability (thanks @Jvr2022!)

1f6e0.png Removed telemetry for VT sequences (thanks @j4james!)

Accessibility Improvements​


1f6e0.png You can now run profiles from the Add tab menu as an admin without a keyboard (thanks @jamespack!)

1f6e0.png The CommandKeyChord in the Command Palette now has a background. This prevents certain accent colors from rendering the KeyChords in an unreadable color (thanks @RickleAndMortimer!)

1f6e0.png Settings now groups elements in their containers for screen readers (#15756)

1f6e0.png Screen reader users can now determine which color scheme is the current default (#15486)

1f6e0.png Default Terminal and Color Scheme ComboBoxes no longer crop at 200% text scale (#15762)

1f6e0.png We’ve added automation property names to the ‘Delete Color Scheme’ button

Bug Fixes​


1f41b.png Default Terminal and Color Scheme ComboBoxes no longer crop at 200% text size.

1f41b.png Fixed horizontal scrolling bugs when using AtlasEngine and DxEngine.

1f41b.png Fixed VtEngine hang when resizing while scrolling.

1f41b.png Fixed a crash when duplicating tabs with elevate:true

1f41b.png Fixed some AtlasEngine Windows 10 bugs.

1f41b.png RIS now re-enables win32 and focus events (thanks @j4james!)

Top contributors​


We love working with the community and recognizing those who made an impact for each release. Here are the community members who helped out for this one!

Contributors who created the most merged pull requests​


1f3c6.png tusharsnx

1f3c6.png j4james

1f3c6.png mpela81

Contributors who opened the most non-duplicate issues​


1f3c6.png ClaireCJS

1f3c6.png scott-xu

1f3c6.png j4james

Contributors who provided the most comments on pull requests​


1f3c6.png j4james

1f3c6.png tusharsnx

1f3c6.png Jaswir

I would also like to give additional recognition to @gonzalo-garcian, @mataha, @yan12125, and @mdgrs-mei for their help on documentation, code health, grammar, spelling, workflow security and maintenance!

Thank you!​


We hope you enjoy this latest release of Windows Terminal Preview! More information on these new features can be found on our docs site and if you find any bugs or have feature requests, feel free to file them on GitHub. If you have any questions you can reach out to Christopher Nguyen (@nguyen_dows) on Twitter.

Thanks again for the continued support!

Jan2023Signatures.png

The post Windows Terminal Preview 1.19 Release appeared first on Windows Command Line.

Continue reading...
 

Similar threads

C
Replies
0
Views
79
Christopher Nguyen
C
C
Replies
0
Views
88
Christopher Nguyen
C
C
Replies
0
Views
70
Christopher Nguyen
C
C
Replies
0
Views
22
Christopher Nguyen
C
B
Replies
0
Views
33
Brandon LeBlanc
B
Back
Top Bottom