Recently a few people asked me about my colorful terminal. So I decided to write a quick article about it. If you like what you see then scroll down.
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
This is a commandline http-client with a cool UI, syntax highlighting, JSON support & many more features & I use it instead of graphical programs like
Postman Ref: https://httpie.org/docs#installation
It's a pretty cool interactive process viewer. Ref: https://htop.dev. After installing you can run the command
Then you can check your node version using
node -v & npm version using
npm -v. You can also look into nvm which is a node version manager to easily switch between differnt node versions.
This will list the content of directories in tree like format when you run the command
If you would like a colorful vim editor then do this:
vi ~/.vimrc and add
If you'd always like to see line numbers then add
set number in your vimrc
you need to customize somethings inside zshrc so run this command
The name of the theme I use is "Jonathan". So far I like it. You can search for the following in your zshrc
ZSH_THEME and set it to whichever theme you like.
I use the following plugins. Find
plugins in your zshrc & add the name of the plugins like this.
plugins=( git zsh-autosuggestions zsh-syntax-highlighting )
But for those plugins to work you need to first clone them so run the following commands:
This is a super handy plugin for auto suggestions. It suggests commands as you type based on history and completions.
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
Provides some cool syntax hylighting.
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
It's fine friends, we all use bad words sometimes(jk), sometimes though :P!
This one corrects errors in previous console commands. So let's say you type
pd instead of
pwd (eyeroll) , it's obviously an invalid command. So all you gotta do is type "fuck" and it would tell you what went wrong.
I'm still exploring this one, it's not super accurate but for now I like it.
To get this to work, inside your
zshrc copy the following
eval $(thefuck --alias)
Here's what it looks like
- ASCII Art
I created my funky ASCII name art using this tool
but if you do not want to go through those steps, you can always create your own art using this tool & copy paste it. http://www.patorjk.com/software/taag/#p=display&f=Patorjk-HeX&t=SONA
I then put this
./welcome.sh at the end of my
If you like rainbow effects then run
brew install lolcat. If you want to apply this rainbow effect to your welcome message then in your
zshrc add this at the end of the file
./welcome.sh | lolcat
- fortune & cowsay
If you would like a random quote by a cow and want all of that in rainbow colors then
brew install fortune and
brew install cowsay and then again go back to the end of your
zshrc and after the welcome message add the following
fortune | cowsay | lolcat
Pls Note: for all the above changes to take effect, run
source ~/.zshrc or restart your terminal.
Yes, your terminal is going to look absolutely beautiful after all this!
Aliases are super helpful & you can add that in your
zshrc as per your use-case & convenience. I wanted the lolcat effect for a few commands so I added the following aliases with lolcat in my config
alias ls='ls | lolcat' alias pwd='pwd | lolcat' alias gs='git status | lolcat' alias tree='tree | lolcat'
I hope this was helpful!
If you would like to share cool tricks with "lolcat" or anything else, I would love to hear from you!
Also, on our medium blog: