You want to make your MacOS terminal colorful and good looking ? Here is what you can do
Tested Configuration:
MacOS: Sierra 10.12
Terminal: iTerm2 & Terminal

1. What terminal to choose

I tested

No big difference for what we will do.

2. Set the colors

Set the terminal colors to xterm-256color.

Here is how you can do it:
screenshot

Then type sudo nano ~/.bash_profile
And add at the end of the file export CLICOLOR=1

and add also this source ~/.bash_prompt at the end

Finally, copy the content of this file
type: sudo nano ~/.bash_prompt
and paste the content of the file inside the bash_prompt

3. Use your terminal as if it was Microsoft Word

For that, we will install micro. It’s an alternative to VI or NANO that allows you to use your mouse for selecting text, and allows ctrl+z, ctrl+y and even more shortcuts for quick and easy text editing

Type brew install micro

Only for iTerm2 users: use ‘xterm Defaults’ configuration as shown bellow screenshot2

Add your favorite shortcuts:
Type micro ~/.config/micro/bindings.json

and inside this file, just write down
screenshot

If you want to custom more shortcuts, click here

4. Use the classic shortcut

On a default terminal you can navigate left and right only letter by letter.
Let’s set up our Terminal so that we can go directly to the end of line, or jump word by word !

Like in the previous part, open the preferences on the Profiles > Keys,
then click “+”
then fill as bellow:
add a shortcut This will allow you to use ⌘→ to reach the end of line.

Here is what I suggest:
⌘→ OF will do “end of line”
⌘← OH will do “start of line”
⌥← b will do “go to left word”
⌥→ f will do “go to right word”

5. Print sizes of directories

To print the size of current files and directories (sorted by size)

First you need to install coreutils by typing
brew install coreutils
Then type micro ~/.bash_profile
And finally write this at the end of the file alias getsize='du -hs * | gsort -h'

6. Increase search history

Your terminal logs every command line you type. To see your history, type in your terminal: history
A very useful keyboard shortcut in a terminal is Ctrl + R: It will open a reverse search history. For commands you don’t use often, this is a quick way to retrieve it. However, by default it is limited to 500 entries only (type ` echo $HISTSIZE` to see it)

So to increase this, in your terminal type:

sudo nano ~/.bash_profile

And add at the end of the file

HISTFILESIZE=1000000000
HISTSIZE=1000000

7. Preview CSV files

MacOS comes with a preview tool called “Quicklook” but it sucks for CSV files.
I recommend this plugin to fullfill this need. The instructions here are very easy.

Other plugins (for JSON…) are available here