My scrapbook about almost anything I stumble upon in my tech world. If you find anything useful don't forget to give thumbs-up :)

Breaking

Monday, November 21, 2022

Enabling your Shell Environment for Enhanced Developer Experience

Ola Amigos !! Whether you are a developer or not if you are working on a Shell, you are probably is one of many who doesn't like the look and feel of Shell's environment. It does not matter which OS (Ubuntu, RHEL, Solaris or Windows WSL) you are working on a bland blank and white screen in the era of colors.  

        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. 


-

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. 


Like the below page to get the update  
Facebook Page      Facebook Group      Twitter Feed      Telegram

No comments:

Post a Comment

Disclaimer

The postings on this site are my own and don't necessarily represent IBM's or other companies positions, strategies or opinions. All content provided on this blog is for informational purposes and knowledge sharing only.
The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of his information.