But don't worry, Today, I am going to share what I do whenever I get a new machine, how do I make my shell life colorful. These tips are completely optional or you can jump the steps as you like. So without further a due, let's get start -
Step #1 - Installing ZSH
Skip if you are using Macbook, as it already comes with ZSH installed. Most of the other Unix like OS comes with Bash so we are going to install ZSH, Though there is nothing wrong with Bash but a lot of tooling available around ZSH which we are going to utilize.
I am assuming you are using Ubuntu hence all the commands are targeting that. Follow the link for the commands for other OSs as well.
Step #2 - Installing Oh-My-ZSH
As I was saying, Oh-My-ZSH is a open source framework written for ZSH to easy customization and configuration. Follow the link for other method of installation.
Step #3 - Setting up Theme
You can skip if you have any other theme preference but I love the theme "powerlevel10k", You can install this theme by running the below commands -
-
Once, you are done with this step, Exit and reopen terminal to start the configuration, there are going to be bunch of questions which you have to opt-in/out based on your likings. If you don't want to use this theme, there are many other themes which you can explore and play-around.
Step #4 - Enabling Plugins
Oh-my-zsh offers plethora of plugins to make your life easy which you can explore. Here, I am going to share which I like the most. But keep in mind that plugins execute at shell startup so it will slow down shell start if you are using too many plugins. So pick and choose as per your need.
a. zsh-syntax-highlighting
b. zsh-history-substring-search
c. zsh-autosuggestions
d. zsh-completions
e. history-search-multi-word
b. zsh-history-substring-search
c. zsh-autosuggestions
d. zsh-completions
e. history-search-multi-word
-
Step #5 - Few Tips
* Use take command to create and cd into any directory, if the directory exists, it will allow you to cd into it.
i.e - take src # which actually execute as --> mkdir -p src && cd src
* Use md command which is actually an alias for mkdir -p
i.e - md src/package/calc # execute as --> mkdir -p src/package/calc
* Oh-my-zsh allow automatic cd, you don't have to use cd command to switch directories, simply type the directory name and you will be in.
i.e - src/package/calc # execute as --> cd src/package/calc
Explore this oh-my-zsh cheat-sheet for more handy-dandy commands to speedup your work. This is it for this post, we will discuss few other tools which make your life easier in next post.
Facebook Page Facebook Group Twitter Feed Telegram
No comments:
Post a Comment