✨A great terminal on Windows?
Sounds crazy? It’s possible though 😉
> I’m not a native English speaker. If you see any typo, please let me know ❤
Here’s what it looks like with the monokai theme on:
Not really good, right? Things get much better when you activate
Theses days, almost every body has
git installed on his system (so this tricks only works if you have it too). Well, you might not have notice but there is a
bash.exe file which allows you got run a Unix like
bash prompt. It’s located where you’ve installed
Git and in the folder
bin, (it’s likely to be here:
So, we need to combine Hyper and bash. Easy.
hyper config file
C:/Users/<your username>/.hyper.js, (or
~/.hyper.js if you’re already in Unix mode 😊), you can set the value of
shell to the absolute path to the
bash.exe and that’s it! You’re done! Start Hyper and you’re good to go with every Unix command (
less, all that awesome stuff 😉).
Clear the screen
There’s a little problem with hyper though: if you press
ctrl+L, the cursor moves up, but the text isn’t “removed”, which gives a weird thing.
You can solve that by setting the
TERM environment variable to
msys(in my case, it’s the first one that worked). In order to do that, you can just type each time
export TERM="the-one-that-worked-for-you", or, you add it in your
~/.hyper.js environment variables:
A nice prompt text
You might not have realized, but now, everything is Unix-like: start customizing in your
~/.bashrc: for example, the prompt.
You can change the prompt by changing the
PS1 variable (and the
PROMPT_COMMAND has to be a function which is called just before the
PS1 variable is displayed. This let’s you do some pretty cool stuff). If you’re interested in how to get the same result, have a look at my dotfiles!
The prompt is simply the current path, then the branch (you can use the
__git_ps1 function I think, but I made my own). And then the smiley tells me the last commit date (the idea comes from gitmoji).
That’s it for this post! It was just a quick way to set up your terminal, but I’ll probably share you some more tips and tricks about terminals later on! So make sure you hit this
follow button, and just let me now what you thoughts are about this post 🙂 (my first one 🎉).