You want a sexy terminal? — zsh/ohmyzsh

TWESIGOMWE GILBERT
2 min readOct 28, 2020

Ok, without wasting any time, do you want a terminal that looks like this?

And you are bored of this?

I personally had the boring version for quite long because I had no clue whatsoever on how to turn it around to look sexy…I din’t even know what to google. All I could do was to admire those who had it, until one of my workmates (Jace) revealed the small secret.. haha. Bigups to you Jace Roldan.

And before I show this to my workmate James, he gotta buy me lunch coz I know how much he badly wants it.. hahaha.. Please if you see this article, go quite don’t tell him otherwise I will miss my lunch offer!

So the golden secret is here!

For starters, you are going to be using `zsh` instead of `bash`.

To get a sexy terminal like the one above, we use https://github.com/ohmyzsh/ohmyzsh and then set the theme to ZSH_THEME=”agnoster” in .zshrc file.

I surely don’t want to repeat the setup procedure that is already on that github repo.

After you have set it up, you may consider the following like I did.

  1. Maybe what I would like to add is that, I am also using a terminal know is Terminator` … you can check here if you like https://gnometerminator.blogspot.com/p/introduction.html

2. Then also, one other thing I would like to note is that I had to shorten my username on the terminal and I added export DEFAULT_USER="$(whoami)" in .zshrc ash shown here https://stackoverflow.com/questions/31848957/zsh-hide-computer-name-in-terminal

3. The other thing was, I wanted to shorten the path on the terminal as I didnt want it to show the full path. I was only interested in showing the current directory, and current branch

I got an insight from this link https://github.com/agnoster/agnoster-zsh-theme/issues/19, and the suggestion was to;

change

`prompt_dir() {
prompt_segment blue $CURRENT_FG ‘%~’
}`

to
prompt_dir() {
prompt_segment blue $CURRENT_FG ‘%c’
}

I did this inside the file below (remember I am using agnoster as my theme). May be the file could defer depending on the theme you choose.

~/.oh-my-zsh/themes/agnoster.zsh-theme

Note: many themes require installing the Powerline Fonts in order to render properly.

--

--

TWESIGOMWE GILBERT
0 Followers

A software engineer developing applications using Django-Python, ReactJS, VueJS