Guest Christopher Nguyen Posted September 26, 2023 Posted September 26, 2023 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! [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. 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] Emoji Support in Command Prompt [/HEADING] That’s right! You are now able to input emojis in your Command Prompt Don’t believe me? Throw some emojis in your Command Prompt and find out [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! 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]) [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 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: [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. 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] 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!) The number of search results and positions of hits are now shown in the scrollbar (thanks @Don-Vito! and @zadjii-msft!) Added a [iCODE]--appendCommandLine[/iCODE] flag for appending to a command (thanks @hanpuliu-charles!) Scroll marks can be cleared by [iCODE]clear[/iCODE], [iCODE]cls[/iCODE], [iCODE]Clear-Host[/iCODE], and other clear buffer actions! Added an option to default to show an icon in tab, hide tabicon, or make an icon in the tab monochrome (thanks @bundgaard!) Added support for Erase Color Mode (thanks @j4james!) Users can now use an action to display a toast containing the Terminal’s “virtual” CWD. Allow inheriting env vars from [iCODE]wt[/iCODE] again and added other env var changes. Added an experimental [iCODE]experimental.moveCursorWithMouse[/iCODE] setting for moving the cursor with the mouse. This requires Shell Integration to be enabled. 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 [iCODE]experimental.rainbowFrame[/iCODE] setting!) [HEADING=1]Performance Improvements[/HEADING] We rewrote [iCODE]COOKED_READ_DATA[/iCODE] to improve Windows Terminal performance. We rewrote resize with reflow ([iCODE]TextBuffer::Reflow[/iCODE]) so it’s faster and more correct. Reduced GdiEngine input latency. Reduced the cost of resetting row attributes. The text buffer is now vectorized committed on demand and faster than before. The whole Settings UI library will only load when you open the Settings UI. This change saves memory. [HEADING=1]Miscellaneous Improvements[/HEADING] Added support for ITU’s T.416 – ODA SGR (38/48) sequence (thanks again @tusharsnx!) You can now copy text without dismissing the text selection by setting [iCODE]dismissSelection[/iCODE] to [iCODE]false[/iCODE] (thanks @gonzalo-garcian!) Improved [iCODE]Run-Test.ps1[/iCODE]‘s maintainability and readability (thanks @Jvr2022!) Removed telemetry for VT sequences (thanks @j4james!) [HEADING=1]Accessibility Improvements[/HEADING] You can now run profiles from the Add tab menu as an admin without a keyboard (thanks @jamespack!) 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!) Settings now groups elements in their containers for screen readers (#15756) Screen reader users can now determine which color scheme is the current default (#15486) Default Terminal and Color Scheme ComboBoxes no longer crop at 200% text scale (#15762) We’ve added automation property names to the ‘Delete Color Scheme’ button [HEADING=1]Bug Fixes[/HEADING] Default Terminal and Color Scheme ComboBoxes no longer crop at 200% text size. Fixed horizontal scrolling bugs when using AtlasEngine and DxEngine. Fixed VtEngine hang when resizing while scrolling. Fixed a crash when duplicating tabs with [iCODE]elevate:true[/iCODE] Fixed some AtlasEngine Windows 10 bugs. 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] tusharsnx j4james mpela81 [HEADING=2]Contributors who opened the most non-duplicate issues[/HEADING] ClaireCJS scott-xu j4james [HEADING=2]Contributors who provided the most comments on pull requests[/HEADING] j4james tusharsnx 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! The post Windows Terminal Preview 1.19 Release appeared first on Windows Command Line. Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.