# Boosting up your terminal for development — Productivity

One tool which is always with you as a Software developer is The Terminal (or Console, as you prefer). So we can use some *plugins/extensions* to get it "smarter" and then improve your productivity.

# **First things**

First things first. This article *(to make this one light)* it covers macOS and Linux Users, so for Windows Users I will write another one covering setup, customization and improvements.

## **What Will I get?**

I choose some plugins that help me at work like: In line auto-complete command, common suggestions, Git Icons indicators and Project path indicators, Colorful semantics and so on.

![](https://miro.medium.com/v2/resize:fit:700/1*qFxSLnj9dHiamwmapB42QQ.png align="center")

## **The Tools**

To get these features on your terminal you don't need another Terminal app itself. You can get one without problem, like iTerm for macOS or DeepinConsole or something else, but it isn't a requirement.  
All you'll need is:  
\- zsh: a shell (like bash) built-in on macOS Catalina and Later;  
\- ohmyzsh: to be able attach plugins, like zinit;  
\- zinit installer and its plugins to *do things;  
\-* themimg: theme and fonts for custom icons for Languages/frameworks etc;

# **Let's Start**

So, if you are on macOS Catalina or Later you have the zsh shell built in on your terminal. In another hand you must to install it and make it your default shell.

> on Linux  
> `brew install zsh` or  
> `sudo apt install zsh`
> 
> Make it default:  
> `chsh -s $(which zsh)`
> 
> on macOS  
> `brew install zsh`
> 
> make it default: on newest macOS versions.  
> `chsh -s /usr/local/bin/zsh`
> 
> on HighSierra and older:  
> `chsh -s /bin/zsh`

Doing this you should be able to run zsh on your machine. To check if works fine run `zsh --version` or `/bin/zsh --version`

![](https://miro.medium.com/v2/resize:fit:700/1*xcd_pAcbaZUF5N9chKZ0PQ.png align="center")

Now we will install [**OhMyZsh**](https://github.com/ohmyzsh/ohmyzsh) you can install it using three methods, curl, wget and fetch:

> curl (recommended):

```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

> wget:

```bash
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

> fetch:

```bash
sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```

![](https://miro.medium.com/v2/resize:fit:700/1*rPJ1OpelFyvY2i-PVBmB5Q.png align="center")

Now let's download the theming and fonts/icons. To the theme you can choose anyone you like, I got Dracula *cos'* I do like it.  
So check [**Dracula's website**](https://draculatheme.com/) and pick a theme for your terminal. There are some terminals on Compactibility List: Gnome, iTerm, [Terminal.app](https://github.com/ohmyzsh/ohmyzsh)(that is my current on this example) etc. Next, follow the steps to download it and activate:

![](https://miro.medium.com/v2/resize:fit:700/1*BRJUq7allr10tOY9HH59nA.png align="center")

[https://draculatheme.com/](https://github.com/ohmyzsh/ohmyzsh)

The fonts and icons we'll use [**FiraCode**](https://github.com/tonsky/FiraCode/releases) and **Spaceship Theme.** With FiraCode we can use a free monospaced font with programming ligatures. SpaceShip make some icons from git, languages version, Docker and path be displayed on terminal. So just follow the [**Github Release link**](https://github.com/tonsky/FiraCode/releases), download and install the font format you prefer.  
Then select FiraCode on your terminal profile, as the image bellow:  
***Terminal &gt; Preferences &gt; Profile &gt; Font***

![](https://miro.medium.com/v2/resize:fit:700/1*2aK-vgDBxUKwM1UIrIsckw.png align="center")

For Spaceship you just need a couple of command to download, link and set it on zsh profile file.

> Download Spaceship:

```bash
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
```

> Then link it:

```bash
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
```

So now inside the file **~/.zshrc** replace the default theme on **ZSH\_THEME** variable like this: **ZSH\_THEME=”spaceship”** then restart the terminal.

![](https://miro.medium.com/v2/resize:fit:700/1*4mdJ301MZN2opp_7v-j-qg.png align="center")

Now we will set the spaceship settings. At the botton of **~/.zshrc** paste the following code:

> *SPACESHIP\_PROMPT\_ORDER=(  
> user # Username section  
> dir # Current directory section  
> host # Hostname section  
> git # Git section (git\_branch + git\_status)  
> hg # Mercurial section (hg\_branch + hg\_status)  
> exec\_time # Execution time  
> jobs # Background jobs indicator  
> exit\_code # Exit code section  
> char # Prompt character  
> )*
> 
> SPACESHIP\_USER\_SHOW=always  
> SPACESHIP\_PROMPT\_ADD\_NEWLINE=false  
> SPACESHIP\_CHAR\_SYMBOL="$\_❯"  
> SPACESHIP\_CHAR\_SUFFIX=" "

these fields **SPACESHIP\_CHAR\_SYMBOL** and **SPACESHIP\_CHAR\_SUFFIX** You can use any String you want to customize the first and second line on input terminal. So Mine looks like that:

![](https://miro.medium.com/v2/resize:fit:700/1*uYBXMGeGjsbFgcw573QDSQ.png align="center")

# **Final touch**

Finally let’s adds the plugins and finish the boost. First install zinit installer:

```bash
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"
```

When it ends **restart the terminal** and if some installation is needed it will run by itself, so wait the end of instalation and go to next step.  
Now open again the **~/.zshrc** file and adds the following code bellow the last line on the file:

> *zinit light zdharma-continuum/fast-syntax-highlighting  
> zinit light zsh-users/zsh-autosuggestions  
> zinit light zsh-users/zsh-completions*

The file will looks like that:

![](https://miro.medium.com/v2/resize:fit:700/1*FM9rqjFaqAIeaiyaoeCXxg.png align="center")

# **Conclusion**

So! Now you have a terminal with thousands of add-ons for common tools like Yarn, Homebrew, Node etc (*you just need to press TAB to complete commands*); commands based on run history; syntax highlighting with missing command indicator and so on!

I hope you enjoy it and these tips save some seconds by day and hours by weeks or by year on your job (😁😅🤣).  
seeya!
