devblogs.microsoft.com
Open in
urlscan Pro
2a02:26f0:6c00:29e::2f1e
Public Scan
Submitted URL: https://go.microsoft.com/fwlink/?linkid=2028595
Effective URL: https://devblogs.microsoft.com/commandline/new-experimental-console-features/
Submission: On August 12 via manual from GB — Scanned from GB
Effective URL: https://devblogs.microsoft.com/commandline/new-experimental-console-features/
Submission: On August 12 via manual from GB — Scanned from GB
Form analysis
2 forms found in the DOMName: searchForm — GET /search
<form class="c-search" autocomplete="off" id="searchForm" name="searchForm" role="search" action="/search" method="GET"
data-seautosuggest="{"queryParams":{"market":"en-us","clientId":"7F27B536-CF6B-4C65-8638-A0F8CBDFCA65","sources":"Microsoft-Terms,Iris-Products,DCatAll-Products","filter":"+ClientType:StoreWeb","counts":"5,1,5"},"familyNames":{"Apps":"App","Books":"Book","Bundles":"Bundle","Devices":"Device","Fees":"Fee","Games":"Game","MusicAlbums":"Album","MusicTracks":"Song","MusicVideos":"Video","MusicArtists":"Artist","OperatingSystem":"Operating System","Software":"Software","Movies":"Movie","TV":"TV","CSV":"Gift Card","VideoActor":"Actor"}}"
data-seautosuggestapi="https://www.microsoft.com/services/api/v3/suggest"
data-m="{"cN":"GlobalNav_Search_cont","cT":"Container","id":"c1c9c3m1r1a1","sN":1,"aN":"c9c3m1r1a1"}" aria-expanded="false">
<input id="cli_shellHeaderSearchInput" aria-label="Search Expanded" aria-controls="universal-header-search-auto-suggest-transparent" aria-owns="universal-header-search-auto-suggest-ul" type="search" name="query" role="text" placeholder="Search"
data-m="{"cN":"SearchBox_nav","id":"n1c1c9c3m1r1a1","sN":1,"aN":"c1c9c3m1r1a1"}" data-toggle="tooltip" data-placement="right" title="" data-original-title="Search">
<button id="search" aria-label="Search" class="c-glyph" data-m="{"cN":"Search_nav","id":"n2c1c9c3m1r1a1","sN":2,"aN":"c1c9c3m1r1a1"}" data-bi-mto="true" aria-expanded="false">
<span role="presentation">Search</span>
<span role="tooltip" class="c-uhf-tooltip c-uhf-search-tooltip">Search</span>
</button>
<div class="m-auto-suggest" id="universal-header-search-auto-suggest-transparent" role="group">
<ul class="c-menu" id="universal-header-search-auto-suggest-ul" aria-label="Search Suggestions" aria-hidden="true" data-bi-dnt="true" data-bi-mto="true" data-js-auto-suggest-position="default" role="listbox" data-tel="jsll"
data-m="{"cN":"search suggestions_cont","cT":"Container","id":"c3c1c9c3m1r1a1","sN":3,"aN":"c1c9c3m1r1a1"}"></ul>
</div>
</form>
#
<form id="myForm" action="#">
<div class="modal-body">
<div class="form-group">
<label for="code-text">Paste your code snippet</label>
<textarea class="form-control" id="code-text" style="height: 150px;"></textarea>
</div>
</div>
</form>
Text Content
We use optional cookies to improve your experience on our websites, such as through social media connections, and to display personalized advertising based on your online activity. If you reject optional cookies, only cookies necessary to provide you the services will be used. You may change your selection by clicking “Manage Cookies” at the bottom of the page. Privacy Statement Third-Party Cookies Accept Reject Manage cookies Skip to main content Microsoft Windows Command Line Windows Command Line Windows Command Line * Home * DevBlogs * Developer * Visual Studio * Visual Studio Code * Visual Studio for Mac * DevOps * Developer support * CSE Developer * Engineering@Microsoft * Azure SDK * IoT * Command Line * Perf and Diagnostics * Dr. International * Notification Hubs * Math in Office * Technology * DirectX * PIX * SurfaceDuo * Startups * Sustainable Engineering * Windows AI Platform * Languages * C++ * C# * F# * Visual Basic * TypeScript * PowerShell Community * PowerShell Team * Python * Q# * JavaScript * Java * Java Blog in Chinese * .NET * .NET * .NET MAUI * Blazor * ASP.NET * NuGet * Xamarin * Platform Development * #ifdef Windows * Apps for Windows * Azure Depth Platform * Azure Government * Bing Dev Center * Microsoft Edge Dev * Microsoft Azure * Microsoft 365 Developer * Old New Thing * Windows MIDI and Music dev * Windows Search Platform * Data Development * Azure Cosmos DB * Azure Data Studio * Azure SQL Database * OData * Revolutions R * SQL Server Data Tools * More Login Search Search Cancel NEW EXPERIMENTAL CONSOLE FEATURES Rich Turner December 10th, 201829 As of Windows 10 build 18298, when you open the properties page of any Console window, you’ll notice an additional “Terminal” tab. Click on this tab and you’ll see several new settings for some experimental features we’re working on for future OS releases: ]2 Experimental settings in action > Important Note: These settings are “experimental”, because in certain > scenarios, it’s possible that they might not behave like you would expect them > to, may not make it into the next OS release, and may change completely before > we ship! But have fun with them anyway and let us know how you get on – we’d > love to hear your feedback. Let’s outline each of the settings groups from the > bottom up, ending with a more thorough discussion the Terminal Color settings: TERMINAL SCROLLING DISABLE SCROLL FORWARD: * When cleared (default state), the Console can to scroll anywhere within the Console’s buffer, even below the most recent row of text displayed When checked, the Console will not allow scrolling below the last line output, similar to how most *NIX terminals work CURSOR SHAPE Legacy Style: Thicker underscore by default, but controlled by the cursor size property in the “Options” page Underscore: Thinner underscore Vertical Bar: For all you crazy kids who like your cursors tall and skinny Empty Box: The second-best cursor: Solid Box: The one true cursor CURSOR COLORS Inverse Color: The current and default behavior where the cursor color is the calculated inverse of the background color … which results in, for example, this adorable fetching pink against the bright green background of my first computer – the Dragon 32 Use Color: Draw the cursor in a specific RGB color, like this fetching green against dark gray background: TERMINAL COLORS The Terminal Colors fields allow you to specify specific RGB color values for the default foreground and/or background colors. These colors are independent of the color palette and are not affected by changes you make to your color palette! But before we discuss the inherent implications here, we need to consider how these new settings fit into the color changes we’ve been making over the last several Windows 10 releases: KARMA KARMA KARMA KARMA CONSOLE CHAMELEON Over the last couple of years, during “The Grand Overhaul” of Windows Console, we’ve made some significant improvements to Console’s parsing and handling of ANSI/VT sequences, and how the Console stores and renders colored text. This all started with a rewrite of the Console’s VT parser. Prior to the (then new) team’s efforts, Windows Console barely supported any VT sequences at all. But with the steady growth in adoption of *NIX-first open-source tools, many of which emit VT sequences to color and draw text-based UI’s, it was increasingly imperative that the Windows Console be able to support VT sequences. ]10 Before (XP) and after (Win10) VT support added to Console This was made even more important and urgent due to the arrival of Windows Subsystem for Linux which allowed unmodified Linux binaries to run natively on Windows, allowing Windows users to easily run most of the *NIX tools they’d previously had to fire-up in a separate VM. The first significant version of the Console’s new VT engine shipped in Windows 10 1609 (Anniversary Update), and was quickly followed in the 1703 (Creators Update) release which contained much richer support for a wider range of VT sequences. This allowed Console to render many of even the most complex text-based UI’s generated by tools like Tmux (a great tutorial here for the uninitiated) and Midnight Commander … or even vim, bash, Midnight Commander and htop running simultaneously in separate Tmux panes: ]14 TMux hosting vim, bash, Midnight Commander, and htop Also in Creators Update, the Console shipped its massively improved color support, increasing its color support from a mere 8-bit/16-colors (a single 8-bit value held both the foreground and background color 0-7 in the low and high nybble respectively), to full 24-bit/16M-colors! But we weren’t yet done! In the Fall Creators Update (Oct 2017), we updated the Console’s default color palette for the first time … ever! After working with Microsoft’s usability and accessibility teams, and following recommended color selection guidelines, we arrived at a new color palette that is FAR better suited to modern high-contrast displays. In addition, we also shipped an open-source ColorTool which you can use to apply different color palette’s to your Console windows if you wish. So, we’re done with color support in the Console, right? Nope! LOOKING BACK, MOVING FORWARD The Console now lives in two worlds: 1. 1. Windows – Console supports traditional/legacy command-line Windows apps that call the Win32 Console APIs to color/manipulate text displayed on the Console 2. ANSI/VT – Console also now supports apps that color/manipulate the text that they display by embedding VT sequences within the text that they emit Because of #2 above, Console has to support some of the different ways in which VT compatible terminals think about the world. A key difference between Windows Console and *NIX-based VT Terminals is that *NIX Terminals have a notion of default foreground and background colors, which are independent from the Terminal’s color palette. The Windows Console does not … at least not quite the same! Windows Console refers the “Screen Text” and “Screen Background” colors to the colors defined in the Console’s palette: ]19 Console color settings But Console has no notion of “default” foreground or background color to the command-line apps that draw on the screen. At best, there’s an assumption that color #0 is often the background color, and that #7 is the foreground, but this is an often-incorrect assumption, not a widely-understood rule. In fact, Windows command-line apps have no way of determining the default foreground and background colors!! For a good example of this, let’s explore Windows PowerShell: The Windows PowerShell team wanted to differentiate PowerShell Consoles from Cmd Consoles by changing the PowerShell Console’s default background color. They specifically modified the PowerShell shortcuts’ settings: * Re-defined color #5 as a specific shade of blue: RGB(1,36,86) * Re-defined color #6 as a specific shade of gray: RGB(238,237,240) However, they also decided to modify the shortcut’s background and foreground color indexes to * Color #5 as the background color (instead of the generally assumed color #0) * Color #6 as the foreground color (instead of the generally assumed color #7) Sometimes, PowerShell wants to, for example, “render this text in on whatever the default background color is”. Alas, because Windows Console has no API to discover what the “default background color” is, PowerShell assumes that the background is the color defined by color #0 … which usually IS the background color … except in PowerShell which uses color #5 Thus, if you’ve ever mis-typed a command in Windows PowerShell, you’ve likely seen something like this: ]20 PowerShell assumes the background color is #0 MOVING FORWARD Alas, the changes we’re working on (and exposing via the experimental Terminal settings page) won’t fix this specific issue for Windows PowerShell Existing/legacy applications that specifically say “draw this text in on color #0” will still draw text in some-foreground-color, on a (usually black/dark) background, even if the Console’s default background color is bright green! In some ways this is good;there will be no behavioral change for existing/legacy apps. But the downside is that such apps will continue to render less than optimal output (like in the PowerShell example above. However, making Console aware of the notion of “default independent foreground and background colors” will enable Console to more accurately render VT enriched text-UI, and will give Console users more control over the customizability of their Command-Line environment. CALL TO ACTION! This issue further amplifies the recommendation to start writing (or update existing) Command-Line apps to emit VT enriched text, rather than calling Win32 Console APIs to control/format Console output: VT-enabled apps will not only benefit from rendering improvements like those described above (with more on the way), but they’ll also enjoy richer features available via VT-sequences, like 24-bit color support, and default foreground/background color support. We look forward to hearing how you get-on with these experimental changes. If you find issues with the color support, please find/file issues on our GitHub issues repo, reach out and let @richturn_ms know on Twitter, and/or submit feedback via the Feedback Hub. RICH TURNER SR. PROGRAM MANAGER, WINDOWS CONSOLE & COMMAND-LINE Follow Posted in Cmd Command-Line Linux tools Windows Console Windows Subsystem for Linux (WSL)Tagged ANSI/VT Sequences cmd Color Linux PowerShell READ NEXT What’s new for WSL in Windows 10 version 1903? The next Windows update is coming soon and we’re bringing exciting new updates to WSL with it! These include accessing the Linux file system from Windows, and ... Craig Loewen February 15, 2019 28 comments Announcing WSL 2 Today we’re unveiling the newest architecture for the Windows Subsystem for Linux: WSL 2! Changes in this new architecture will allow for: dramatic file system ... Craig Loewen May 6, 2019 112 comments 29 COMMENTS Comments are closed. Login to edit/delete your existing comments * Page 1of comments * Page 2of comments * Next comment * Petr Laznovsky April 3, 2019 1:34 am collapse this comment Any news in cmd.exe improovements? * Travis Terrell November 21, 2019 12:56 pm collapse this comment I strongly suspect Windows Terminal is the way going forward. * Rich Turner November 25, 2019 12:17 pm collapse this comment Note: Cmd is a command-line shell, not a terminal. @Petr: Cmd’s primary job is to continue to run legacy batch scripts. This means that: 1. Cmd can never be removed from the OS while there are still legacy batch scripts to run 2. Cmd can almost never be changed because even tiny changes/fixes breaks someone, somewhere 3. Any new command-line scripts, or existing batch files should be migrated to PowerShell scripts wherever possible. PowerShell is a MUCH more powerful, feature-rich, x-platform, open-source shell and is where all of Microsoft’s scripting effort is being spent. * john fay June 1, 2020 6:11 am collapse this comment > SO RICH HOW DO YOU LIKE IT OVER THERE HMM I SUSPECT YOUR A BOT AND > NOT EVEN A REAL PERSON John – I deleted your commentary which was way off-topic. Please keep comments respectful or you will blocked from posting comments on this site. * Александр Федосеев April 6, 2019 4:09 pm collapse this comment I still waiting this moment when cmd will support 256colors. PDcurses wanna blood & colors * Travis Terrell November 21, 2019 12:55 pm collapse this comment Get the Windows Terminal Beta! https://github.com/microsoft/terminal * Rich Turner November 21, 2019 4:50 pm collapse this comment My Cmd, I assume you mean the Windows Console UX through which you interact with Cmd and other command-line apps? If so, then Console has supported 16M 8-bit RGB colors since 2017, but only if your command-line app/script emits VT to control colors. Windows’ Command-Line API is not going to be extended to support more than the current/legacy 16 palette terminal-controlled colors. * Chuck Cochems April 19, 2019 5:07 pm collapse this comment PLEASE PLEASE PLEASE add in full xterm-256 support! this is vitally important to actually using text editors under ssh. While colors do work, the simple pico text editor does not behave. this is because not all of the used control codes work. xterm supports a totally ludicrous number of excape sequences. http://www.xfree86.org/4.7.0/ctlseqs.html Support EVERYTHING. then stuff will work. * Uellington Santos September 24, 2019 6:05 am collapse this comment Have you tried Windows Terminal instead of Windows Console? Take a look: https://devblogs.microsoft.com/commandline/introducing-windows-terminal/ * Rich Turner September 24, 2019 6:29 am collapse this comment Thanks Chuck. I think what you mean is “support more VT-Sequences” – XTerm is NOT the only terminal in the world, and there are many apps & tools that emit VT-Sequences that even xterm doesn’t support! This said, we are expanding and improving our VT support with each release, especially in Windows Terminal. Improvements made in Windows Terminal will be re-integrated into the in-box Console over time, though on a slower cadence since Console is built-into and thus gated by the frequency of Windows updates, whereas Terminal is (currently) updated ~monthly. * Craig Anderson May 4, 2019 10:01 am collapse this comment Bless you for adding the Disable Scroll Forward option! Though some may find it useful, I’ve alway found it to be the most consistently aggravating things when using the Windows console. Having to constantly sroll back up because a spinn of the mouse wheel scrolled you down way past the current line is so horrible. Thank you. * Gaowen Jin May 12, 2019 5:36 am collapse this comment Change “Cursor Shape” doesn’t work for me. After I type anything, it will change to “Legacy Style”. This happened in Windows 10 build 18894. * Ruiyang Li June 11, 2019 10:33 pm collapse this comment You are not alone. * Chris Hayes August 3, 2019 7:21 pm collapse this comment I had a little trouble with the cursor option resetting, but it seemed like it would reset whenever I changed settings tabs without hitting okay and reopening the settings panel. Not sure if I was experiencing the same bug as you guys. What if you set the cursor via the Right Click > Defaults panel? That might force it to stay. * Neil MacMullen July 25, 2019 3:28 am collapse this comment The colortool looks very interesting. Although it’s a larger issue than just configuring colors for the terminal , one of the things I would like to see more focus on is the ability to quickly visually distinguish different windows/terminals to determine context. For example, I often have 7 or 8 different terminal windows open across multiple virtual desktops and figuring out which one I’m trying to get back to for a particular operation is always tricky. The least bad solution seems to be to give each a distinct background color so I can just remember to alt-tab to “the red one” for example and colortool will certainly help with this (avoiding clashing text colors is always a problem). Other approaches that might be useful…. * Allow the title/tab bar color to be configured * Allow a custom background image per instance * Provide a large numeral overlay during Alt-tab (a bit like when you choose “Identify desktops” in multi-monitor configuration) * Provide a mechanism for _automatically_ shading/brushing the terminal background differently for each new instance. Of course this is a much larger issue than just Terminal – I often have 2 or 3 instances of Visual Studio running and would like to be able to theme these separately for quick identification – but terminal/powershell are usually the worst case for me. * Rich Turner August 1, 2019 1:58 pm collapse this comment Some of this we already do, but please file new feature requests on https://github.com/microsoft/terminal. * Jeremy Bradshaw August 27, 2019 4:28 am collapse this comment I realize this blog post is fairly old now and a lot has changed, though FYI, the link in the “Terminal” tab still comes to this page. Once here, there is some information that no longer holds true. That is, the link to the other blog post (where I’ll comment too) https://blogs.msdn.microsoft.com/commandline/2017/08/11/introducing-the-windows-console-colortool/ – is referencing ColorTool as if it is still part of the Microsoft Terminal. But it isn’t. It also seems like all development is going into Microsoft Terminal, and the links lead to that as well in these posts. So it’s hard to determine what these posts have to do with the built in cmd.exe anymore. * Rich Turner August 27, 2019 3:30 pm collapse this comment Hey Jeremy. Please note that Windows Terminal <> Windows Console. The former is our brand new next-generation Terminal app for Windows. The latter is the traditional Console app shipped within Windows itself. I encourage you to read the blog post series I’ve written to help explain how the Windows command-line evolved, how it ended up where it has, and where we’re going into the future: https://devblogs.microsoft.com/commandline/windows-command-line-backgrounder/ * Barry Irvine October 9, 2019 1:12 am collapse this comment I wonder if these changes are related to cmd.exe’s color command breaking? I used to be able to use the color command without any arguments to reset the colours to what they were when the window opened, but now that only works if cmd.exe is run using the /T:xx option. My PC with windows 10.0.16299.1087 is still working, but all my others have 10.0.18362.295 or later have the problem. I thought it might be something to do with my settings, but when I copied cmd.exe from the working install to one of the other PCs it started working like it used to. Hardly an ideal workaround, especially considering the permissions changes required to replace cmd.exe, but it saves me having to update a huge number of .bat files. * 長瑞 高 October 12, 2019 4:31 am collapse this comment The Popup Text and Popup Background “Colors” does not work at all. And, when switching to Chinese input mode, the cursor disappears and never appear again. C:\Users\Cray>cmd Microsoft Windows [Version 10.0.18362.418] (c) 2019 Microsoft Corporation. All rights reserved. * José Moya November 20, 2019 3:32 pm collapse this comment Hi! I have been using the “legacy terminal” style from the beggining of the terminal changes. Today I installed the WSU and so I unclicked the “legacy terminal” (in order to be able of configuring the username), but I had a black screen for Debian. When I finally could make a user for it (after resetting the install three times), I noticed that when I opened cmd, all I saw was a black window, also. After some tries, I found there was some invisible text I could copy and paste in a notepad. I opened the console properties, selected “colors” and saw they were configures as white text on black background. But then I noticed the new “terminal” tab. Inside it, despite of the colors chosen in the “colors” tab, black was chosen for both text and background. I think I never tinkered with the terminal colors before, but, anyway, shouldn’t be some warning about background being the same color as text? * Rich Turner November 21, 2019 4:58 pm collapse this comment Hey Jose. You should only very rarely need to use the Legacy Console. FWIW, I’ve used it once in the last 5 years! Also note that if you enable Legacy Console, it affects ALL Console instances, not just the one you configure. Best option is to never use Legacy console unless you have no other choice. Console only sets colors etc. to defaults on install. Any other changes to your colors must have been done manually. But don’t feel bad – I did just the same with my foreground and background colors a few months ago Re. warnings about foreground == background, please post an ask in the GitHub repo: https://github.com/microsoft/terminal/issues. * Page 1of comments * Page 2of comments * Next comment TOPICS AccessibilityAF_UNIXANSI/VT Sequencesautomountbackground tasksBashBASICBuffersBuildBuild2017Build2019Build2020Build2021chmodChocolateycmdColorCommand-LineConPTYConsolecontainersCreators UpdatedaemonsDrvFsDvfFsEncodingfilesystemfontifconfiginotifyinteropLinuxLinuxToolsmetadataMS-DOSMSBuildnetworkingOpen-SourceOpenSSHPowerShellPseduoConsolePseudo ConsolePTYreleaseRenderingsettingssocketsStoreSyscallsTabs & SetsTeletypeTerminalThemesTmuxTTYUbuntuUnicodeUTF-8VIntageVisual StudioWhat's NewWin10SWindowsWindows 10Windows 10 SWindows Package Managerwingetwinget.exewingetcreatewinuiWSLwslconfZoom TOP BLOGGERS Kayla Cinnamon Program Manager II Craig Loewen Program Manager II Demitrius Nelon Senior Program Manager Steve Pronovost Partner Development Lead Erika Sweet Program Manager II ARCHIVE July 2022 June 2022 May 2022 March 2022 February 2022 December 2021 November 2021 October 2021 August 2021 July 2021 May 2021 April 2021 March 2021 January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 February 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 August 2017 July 2017 June 2017 May 2017 April 2017 February 2017 January 2017 November 2016 October 2016 September 2016 July 2016 June 2016 April 2016 March 2016 STAY INFORMED CODE BLOCK × Paste your code snippet Cancel Ok What's new * Surface Pro 8 * Surface Laptop Studio * Surface Pro X * Surface Go 3 * Surface Duo 2 * Surface Pro 7+ * Windows 11 apps * HoloLens 2 Microsoft Store * Account profile * Download Center * Microsoft Store support * Returns * Order tracking * Virtual workshops and training * Microsoft Store Promise * Flexible Payments Education * Microsoft in education * Devices for education * Microsoft Teams for Education * Microsoft 365 Education * Education consultation appointment * Educator training and development * Deals for students and parents * Azure for students Business * Microsoft Cloud * Microsoft Security * Azure * Dynamics 365 * Microsoft 365 * Microsoft Advertising * Microsoft Industry * Microsoft Teams Developer & IT * Developer Center * Documentation * Microsoft Learn * Microsoft Tech Community * Azure Marketplace * AppSource * Microsoft Power Platform * Visual Studio Company * Careers * About Microsoft * Company news * Privacy at Microsoft * Investors * Diversity and inclusion * Accessibility * Security English (United States) * Sitemap * Contact Microsoft * Privacy * Manage cookies * Terms of use * Trademarks * Safety & eco * About our ads * © Microsoft 2022