Making Terminal awesome in MacOS
02 Apr 2019How are we going to make Terminal
awesome? Using Oh My Zsh
of course. Now, I know there are countless blogs written on this topic, but I just wanted to make a
personal note of this so that the next time I change my computer, I don’t forget. So here goes.
- Install
Zsh
if you don’t have one. Follow this. - Make
Zsh
your default shell.
– Do this:chsh -s $(which zsh)
– Ensure you have your Terminal pointing toDefault login shell
. Preferences | General | Shells open with
– Restart Terminal - Install
Oh My Zsh
. Follow this. But essentially you need to do this:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- A
.zshrc
file will be created under /Users/XXXXXXX . Just like.bash_profile
is for bash,.zshrc
is for zsh.
– Open the file
– Uncommentexport PATH=$HOME/bin:/usr/local/bin:$PATH
– SetZSH_THEME="agnoster"
- For
agnoster
to work properly you need to install Powerline fonts as mentioned here. There are many fonts to choose from, but I choose Meslo LG L DZ. - Oh My Zsh doesn’t have the auto suggestion plugin installed by default. So you need to install that using this
- Your .zshrc file should have something like this:
plugins=( git zsh-autosuggestions gradle )
- If you want to get rid of the pesky username ‘something@xxxx’, then add
prompt_context() {}
to the last line of the .zshrc file. - Now when you open the Terminal, you many not like it at first instant due to some character missing (because of
improper font) or the awkward color scheme. I have customised the color and you can import my settings.
I have chosen a lighter color scheme.
- There you go. Enjoy your awesome Terminal.
Note: If you are using IntelliJ iDEA, then this will reflect in that as well. Just ensure you do these things:
– Preferences | Tools | Terminal | Shell path = bin/zsh
– Preferences | Editor | Color Scheme | Console Font | Font = Meslo LG L DZ
– Preferences | Editor | Color Scheme | Console Colors | Import Scheme = profile