If you're a developer who primarily works with Windows (such as myself), you
know that the terminal experience kinda sucks. If you stick with Microsoft
terminals, you have cmd
or the Powershell terminal, neither of which have
tabs, so you'll probably have several open at once. Venturing into third-party
options is okay - hyper
looks nice, but trying to run vim inside of it gave me
all sorts of problems. cmder
is actually pretty nice, but the difficulty in
setting a default directory bothered me enough that I just went back to cmd
.
Today, however, at Microsoft Build, they announced a new Terminal!
And it looks pretty awesome. So I'm gonna try it out.
For right now, it can't simply be installed. It can be built from source, but according to this reddit comment (thanks u/zadjii!), there are a few prerequisites, reiterated here:
Individual components
if you don't install it separatelyMSVC v142 - VS2019 C++ x64/x86 build tools (v14.20)
and (unsure if
necessary, but probably a good idea) associated Spectre-mitigated libs
git submodule update --init --recursive
and
nuget restore OpenConsole.sln
inside the repo directoryDeveloper Settings
, you need Developer Mode
setFrom here, with VS201X open the OpenConsole.sln
solution file in the source.
To use the v142 build tools, you'll need to right-click the OpenConsole
solution and select Retarget Solution
, then target the v142 tools and the
10.0.18362.0 SDK.
Set your build target to Release x64
, then build with Ctrl+Shift+B. If all
goes well, you can now select Build > Deploy Solution
, and upon success it
should show up in your Start menu. Then you just open it!
If you're getting compile errors regarding
'function' is not a member of 'std'
, I took the solution from
this PR which is adding the
following line to src/inc/LibraryIncludes.h
:
#include <functional>
There's one thing that basically guarantees I'll be using Windows until I die thanks to this.
TABS!
When you first open it, it looks like a standard cmd
window:
But give it the good ol' universal tab key combo, Ctrl+T
, and my god it's
beautiful:
I might cry. Like the emojis that are now supported by the rendering engine.
That out of the way, onto other things.
On the top right you probably see the down arrow which you might surmise leads
to a menu - what we can see in the Terminal menu is basically just a list of
shells, a Settings
button that opens a profile.json
in some voodoo Roaming
directory, and a Feedback
button that opens the general Windows Feedback Hub.
So not a lot there.
The profile.json
is initially flattened, but we can format it easily enough to
see the top-level options:
{
"alwaysShowTabs": false,
"defaultProfile": "{a699846e-2d03-429b-8346-e47a0e1c4234}",
"experimental_showTabsInTitlebar": false,
"initialCols": 120,
"initialRows": 30,
"profiles": [...],
"schemes": [...],
"showTerminalTitleInTitlebar": true
}
profiles
has two objects with name
fields corresponding to what we saw in
the Terminal menu, cmd
and Powershell
, so we can infer that console-like
applications, likely those built off of conhost.exe, can be included here.
defaultProfile
determines what profile is loaded when you open a new
tab/window, identified by a GUID field on each profile
entry.
schemes
is just definitions for some color schemes, defaulting to Campbell
(used in the screenshots above) and Solarized Light/Dark
for the cool kids.
Solarized Dark doesn't go too well with Powershell...
Solarized Light is pretty solid though.
And it still works nicely with bash prompt colorings!
It live reloads when the settings change, which is pretty nice, but it has crashed once, so best to play with settings on a fresh instance.
Setting alwaysShowTabs
to true
gives you this, which could look better:
And should probably be true by default, but hey, at least we got 'em!
For science I added a new profile to run bash.exe
, called it bash
, and gave
it a new GUID from an online generator, then set it to my default. As you would
expect, it worked like a charm for new tabs and new windows!
I've only played with the new Windows Terminal for around an hour or so, but it's been pleasant and feels promising as far as command line experiences in Windows go. I'll use this as my primary terminal for a while and see how it goes and probably write a follow-up post, but in the meantime, hopefully this post is helpful for anyone looking to build and try it out before it gets properly distributed via the Windows Store or some other method.
This page brought to you by Stephen Hara.