Today I’m writing about Hyper, a program that essentially wraps a terminal instance in a pretty UI. It might sound underwhelming, but it looks really good, and besides that has a number of plugins available to add features that you might not be able to get in a standard terminal.
This is especially true on Windows. Terminal users are limited to either cmd
or powershell
, the latter of which is without a doubt more modern and useable, and yet for some reason I never find myself using powershell
on Windows, and instead open up cmd
without a thought when I need a terminal.
That brings us to Cmder. Cmder is self-described as a “terminal emulator for Windows,” so it is along the same vein as Hyper. Cmder has some really nice features, like tab-autocomplete commands, which is something Windows cmd
didn’t have for a very long time, as far as I know1. It has numerous other features, including tabs, there’s a version that comes bundled with nice utilites like ls
and grep
, and so on. I highly recommend Cmder to anyone who uses the terminal frequently on Windows. You won’t regret it!
So Cmder offers a lot of nice features, and Hyper looks really cool…but what if I wanted to use a Cmder-style terminal within Hyper?
As I found out earlier this week, it is indeed possible.
So, first off, it appears that Cmder accomplishes much of the magic is does by running a command like this:
The interesting bit to me was the argument passed with the /k
switch. Whatever that bat
file does could be easily called when launching Hyper as well, since Hyper’s .hyper.js
config file exposes startup arguments for the terminal it launches.
With that in mind, getting a Cmder-like terminal running within Hyper is basically just a few simple steps:
- Figure out what your %ConEmuDir% directory is by runnning
echo %ConEmuDir%
within Cmder (I don’t think that environment variable is set otherwise) - In
.hyper.js
, inside the value forenv
, add a keyConEmuDir: 'Your/ConEmuDir/Path/Here'
- Again in
.hyper.js
, add to theshellArgs
array 2 values - the/k
switch, and%ConEmuDir%\..\init.bat
as the second
You should end up with something that looks similar to this2:
And that’s it! If you launch Hyper, you should be greeted with a Cmderesque terminal experience, with the current working directory text colored, and (depending on if you installed this Cmder version) Unix commands like ls
available.
You may notice that I ommitted the -new_console:
argument that Cmder uses. I never attempted to use it in my own testing - it may or may not work/play nicely within Hyper, I do not know. Try it if you dare!
The question you may be asking is, “If Cmder on Windows is so good, why would I ever use Hyper?”
I think the answer there is: try them both!
-
I’m really not sure when
cmd
got tab completion, but it as only writing this post that I fired upcmd
and noticed that is would autocomplete something likeexpl
toexplorer
when I pressed tab. ↩ -
Your
.hyper.js
config may not have the--login
argument in shellArgs, mine did by default so I left it there. I am unsure if--login
has any meaning incmd
orpowershell
… ↩