The Command Line

With a lot of modern web development, you‘ll find yourself using the terminal more and more. This can be daunting at first and can become slightly repetitive typing the same tasks over and over again. However, you can configure your terminal to work smarter and harder for the tasks you need to complete.

Firstly, I have been using zsh shell and on top of that, I have installed Oh My Zsh. Add a few configuration settings and some aliases (shortcuts) and you’ll improve your work flow immeasurably.

Splash some colour

The terminal can be a monotone place to be, so why not add some colour. Add these to your ~/.zshrc file.

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced

Shortcuts

Add some shortcuts to save your keyboard and fingers.

alias ls="ls -la -h -Gp -F"
alias grep="grep -n --color"
alias ping="ping -c 5"
alias cls="clear"
alias md="mkdir -p"

Now, instead of typing ls -la or similar, you can just type ls and you'll see a nicer output. You will get the long format (l), all files including dot files (-a), human readable file sizes (-h).

Whenever you use grep you will get nicer colour treatment. Running ping on a domain will exit after five trys. cls is just shorter than clearmd will make directories, recursively.