useful plugins I use on my terminal

Busra Koken
birdsareflying
Published in
3 min readJul 29, 2019
Photo by Kaitlyn Baker on Unsplash

Some people are crazy about their terminal settings, colours, and all. I envy them when I see their amazing looking terminals. I can’t really say I am one of them, but I do use some plugins that make my terminal pretty and easy to use. Now, I can not imagine using the terminal without them.

Recently, I helped one of my developer teammate to set up his terminal. While doing so, he asked me what I use for auto-completion and highlights. I decided to write this blog post to keep them all together.

Terminal application

I use iterm2 on Mac OS as a terminal app for many reasons that I will not explain in detail. There are enough blog posts about it. :)

SHELL

I use zsh with a framework called oh-my-zsh for the shell that comes with most of the magic.

ZSH Theme

My zsh theme is powerlevel9k that makes it so easy to customise my screen.

Update: I recently upgraded to powerlevel10k for a faster terminal. You can also directly start with that. Usep10k configure to access the builtin configuration wizard right from your terminal. It is pretty cool and straight forward. It is also compatible with powerlevel9 settings below. 🚀
Thanks, Oguzhan Girginc for the contribution. :)

First, let’s start with the prompt that is customised with Powerlevel9k.

POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_SHORTEN_DELIMITER=””
POWERLEVEL9K_SHORTEN_STRATEGY=”truncate_from_right”
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir vcs virtualenv kubecontext status)

Setting above respectively,
- shortens my directory path and truncates until the last directory
- puts nothing to my right prompt
- creates a new line right after the prompt
- finally, my left prompt has dir path, git branch, python venv(if active), kubecontex and the last bash command’s status code.

It looks like this:

About colours: I played with iterm2 colour themes and exported mine.

Plugins

Now, this part is probably the most useful part. You will see a couple of tools, plugins I use that make me very efficient to move around.

  1. Autojump
    If you don’t know this yet, you will love it! I don’t even remember every repository, folder name by heart anymore because of this tool. Autojump remembers your cd commands and keeps weight on them. Shortly after, all you need to do type j wor or any kind of close combination to go workshop folder.
  2. zsh Autosuggestions
    I just can’t live without this plugin. It simply reduces my typing in the terminal. zsh-autosuggestions give you suggestions while typing. As you type commands, you will see a completion offered after the cursor in a muted grey colour.
  3. zsh syntax highligthing
    Oh yes! Simply helps me catch syntax errors before I run commands on shell. This plugin provides syntax highlighting for the shell zsh. It enables highlighting of commands while they are typed at a zsh prompt. This helps in reviewing commands before running them.
  4. Other plugins that are also mentioned as keywords on my prompt above:
    git → lots of git alias, branch prompt, and little icons when working in a repo. It also changes colors if there are uncommitted changes.
    kube_ps1 → helps me put kubecontex to the prompt.
    kubectl → if you are working often with kubernetes, this will become handy as it gives you completion of the kubectl API while typing.

That is basically all. I have lots of aliases as well for the commands I use very often. I can imagine that differ from person to person.

Hope this can be useful for some of you.

Cheers,

Busra

--

--

Busra Koken
birdsareflying

Passionate SRE with obsessions about DevOps engineering culture, automation, documentation, diversity and mental health.