Jump to content
Microsoft Windows Bulletin Board

Windows Terminal Preview 1.19 Release


Recommended Posts

Guest Christopher Nguyen
Posted

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!

 

[HEADING=1]Broadcast Input[/HEADING]

 

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.thumb.gif.d30ea7058ceba58241f4be73fb125324.gif

 

[HEADING=1]Web Search[/HEADING]

 

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 [iCODE]defaults[/iCODE] object to [iCODE]profiles[/iCODE] in your [iCODE]settings.json[/iCODE] file:

 

    "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.thumb.gif.c6692ad9eb37405ae04b5f3c5a57763f.gif

 

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

 

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

 

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

 

[HEADING=1]2728.png.b4f54e084a0b30c94746e673d198c9f2.png Emoji Support in Command Prompt 2728.png.833a1df16a342cd99b1e5077d248fc82.png[/HEADING]

 

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

 

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

 

EmojiCommandPrompt.thumb.png.84885b0b2ba81397c9acf18fb9fb3691.png

 

[HEADING=1]Unfocused Acrylic[/HEADING]

 

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.thumb.gif.97049c68905c871cfb22c6af11bfce5d.gif

 

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

 

"opacity": 85,
"useAcrylic": true

[HEADING=1]Suggestions UI[/HEADING]

 

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.

 

[HEADING=2]Enabling Shell Integration[/HEADING]

 

Enabling Shell Integration is a two-step process.

 

1) Enable shell integration marks in [iCODE]settings.json[/iCODE] file.

 

2) Edit your [iCODE]prompt[/iCODE] 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.

 

[HEADING=2]Using Command History in the Suggestions UI[/HEADING]

 

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

 

    "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 ([iCODE]ls[/iCODE] and [iCODE]git status[/iCODE])

 

SuggestionsUIHistory.png.2ae8c0e743acb13a29032ef268c71399.png

 

[HEADING=2]Using SendInput Actions in the Suggestions UI[/HEADING]

 

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

 

Luckily, the Suggestions UI can also use [iCODE]sendInput[/iCODE] actions as a suggestions source. A [iCODE]sendInput[/iCODE] action is an action that sends text input to the shell. If we create a bunch of [iCODE]sendInput[/iCODE] 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 [iCODE]sendInput[/iCODE] actions as a suggestions source, [iCODE]actions[/iCODE] in your [iCODE]settings.json[/iCODE] file should look like this.

 

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

 

In this example, we have created a new [iCODE]showSuggestions[/iCODE] action that allows use all the suggestion sources available to the Suggestions UI including command history and our [iCODE]sendInput[/iCODE] 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 [iCODE]sendInput[/iCODE] actions for our Suggestions UI. In the example below, I added some [iCODE]sendInput[/iCODE] actions for [iCODE]git[/iCODE] scenarios in my [iCODE]settings.json[/iCODE] under the [iCODE]showSuggestions[/iCODE] action:

 

"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 [iCODE]sendInput[/iCODE] actions as a suggestion source:

 

SuggestionsUI.gif.c0deb5e6abf62781cbf400a0362d92df.gif

 

[HEADING=2]Experimental Shell Completion Menu[/HEADING]

 

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 [iCODE]settings.json[/iCODE] 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.5288f9d54931ec691e99a38d1aa26f20.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.

 

[HEADING=1]Usability Updates[/HEADING]

 

26a1.png.511c989886f36f1989e301ed04feef30.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.bddf848c62524dd21cb6359097f24e84.png The number of search results and positions of hits are now shown in the scrollbar (thanks @Don-Vito! and @zadjii-msft!)

 

26a1.png.7fd576d9527d7dab5c56dc830ae334ee.png Added a [iCODE]--appendCommandLine[/iCODE] flag for appending to a command (thanks @hanpuliu-charles!)

 

26a1.png.5198aec1bb0fea2d2f370ac19d46d55a.png Scroll marks can be cleared by [iCODE]clear[/iCODE], [iCODE]cls[/iCODE], [iCODE]Clear-Host[/iCODE], and other clear buffer actions!

 

26a1.png.5d740dd859f253a4d7e6b97e431a45e9.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.1dc0a18730da4c95daae923e8b65534b.png Added support for Erase Color Mode (thanks @j4james!)

 

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

 

26a1.png.961e3f779f571fba58e87f821d5f1745.png Allow inheriting env vars from [iCODE]wt[/iCODE] again and added other env var changes.

 

26a1.png.84f802806ad67e5366043bb9071c688d.png Added an experimental [iCODE]experimental.moveCursorWithMouse[/iCODE] setting for moving the cursor with the mouse. This requires Shell Integration to be enabled.

 

26a1.png.621631ac8cf44997332a04c9fbcdf6b0.png Added support for setting the window frame color with [iCODE]$theme.window.frame[/iCODE], [iCODE].unfocusedFrame[/iCODE], and [iCODE]experimental.rainbowFrame[/iCODE] (I HIGHLY recommend trying out the 1f308.png.a91de963b200b0fdedbe860aaf6281ee.png[iCODE]experimental.rainbowFrame[/iCODE]1f308.png.b98f1849e2c8edf2702477881996e851.png setting!)

 

[HEADING=1]Performance Improvements[/HEADING]

 

1f525.png.6e789e8cc8e4a5ca85f8fa44ec350da0.png We rewrote [iCODE]COOKED_READ_DATA[/iCODE] to improve Windows Terminal performance.

 

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

 

1f525.png.6127bf79e38c5f2d5cab9e6066e6d9c9.png Reduced GdiEngine input latency.

 

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

 

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

 

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

 

[HEADING=1]Miscellaneous Improvements[/HEADING]

 

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

 

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

 

1f6e0.png.03daec53b19086f75a8e1157f951245f.png Improved [iCODE]Run-Test.ps1[/iCODE]‘s maintainability and readability (thanks @Jvr2022!)

 

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

 

[HEADING=1]Accessibility Improvements[/HEADING]

 

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

 

1f6e0.png.7b39fdbc09520e693e11246b8ea18dab.png The [iCODE]CommandKeyChord[/iCODE] 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.351d2e3d64d94069f974c5c4a74b810f.png Settings now groups elements in their containers for screen readers (#15756)

 

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

 

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

 

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

 

[HEADING=1]Bug Fixes[/HEADING]

 

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

 

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

 

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

 

1f41b.png.558ccd4e26bfcdb726b57950645f5385.png Fixed a crash when duplicating tabs with [iCODE]elevate:true[/iCODE]

 

1f41b.png.4838867e3cd5bc89bb19f25e35d5997a.png Fixed some AtlasEngine Windows 10 bugs.

 

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

 

[HEADING=1]Top contributors[/HEADING]

 

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!

 

[HEADING=2]Contributors who created the most merged pull requests[/HEADING]

 

1f3c6.png.5ba7445691bfd4638bd5eb93f5315e07.png tusharsnx

 

1f3c6.png.c816bb8af5e8388428ce722a563eec4f.png j4james

 

1f3c6.png.ac51bcd4d3cb04c6947607af9f6b30cd.png mpela81

 

[HEADING=2]Contributors who opened the most non-duplicate issues[/HEADING]

 

1f3c6.png.23d884ef37ad9d1167bee185ff833baf.png ClaireCJS

 

1f3c6.png.7f356b645b9e4e1dae124ead5b382a6c.png scott-xu

 

1f3c6.png.a51eb16807f2865dca5a7d4208491daa.png j4james

 

[HEADING=2]Contributors who provided the most comments on pull requests[/HEADING]

 

1f3c6.png.3b9fba50737758de5b67f7aa63738b12.png j4james

 

1f3c6.png.ba482b20f2070fe3041af33dacf68588.png tusharsnx

 

1f3c6.png.b101e2c36c0227552e15180731d87e5c.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!

 

[HEADING=1]Thank you![/HEADING]

 

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.thumb.png.c244698c5ac16efc524d03467822432e.png

 

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

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...