My Shell Config On Windows For 2022

Photo by Steve Adams on Unsplash

My Shell Config On Windows For 2022

ยท

2 min read

Last year I wrote an article about my shell config for 2021.

I am renewing the operation this year, and to be straightforward with you

I gave up on Alacritty

Alacritty is nice, but in daily life there were a lot of frictions (that are maybe fixed by now TBH) especially for copy/pasting string into the shell. Also, IIRC no tabs or such.

So what am I using now?

I switched to Hyper! It's an electron-based terminal made by Vercel, the company that offers this platform to greatly ease the deployment of an app. I recommend Vercel and glitch.com also if you want to deploy a small or website easily.

Download link: hyper.is

To make Hyper work with the usual Git Bash, I changed that line in the configuration:

        shell: 'C:\\Program Files\\Git\\bin\\bash.exe',

And to directly copy selected text to clipboard, I changed that line to true:

        copyOnSelect: true,

I didn't change much more aside the font.

New year, new font

Last year I recommended Fira Code. This year I would recommend you Monoid an open source coding font, more details there: larsenwork.com/monoid

Other suggestions

  • If you want an easy way to install and uninstall software from the command line on Windows, check out chocolatey.org
  • If you use Git Bash and Docker like me, you probably want to add that line to your ~/.bashrc:
    alias docker='MSYS_NO_PATHCONV=1 docker'
    
    That will allow you to do things like: docker exec -ti ${CONTAINER} /bin/bash directly from Git Bash.
  • Also, if you use one of the latest Git Bash, there's a bug that creates troubles when you ssh into a server. Symptoms are like you can't use vi or CTRC+C will quit the entire ssh session. Add the following line in your ~/.bashrc as well, and it will fix it.
    export MSYS=enable_pcon
    

Did you find this article valuable?

Support Sonny Alves Dias by becoming a sponsor. Any amount is appreciated!

ย