Make opening your terminal fun

May 15, 2017

My favorite and least useful thing I have set up on my laptop is to run fortune | ponysay when I open a new bash session.

In my .bashrc file I have the following snipped:


if [ -x /usr/local/bin/ponysay -a -x /usr/local/bin/fortune ]; then
    fortune | ponysay
fi

If you want one script to install everything for you:


#!/bin/bash

echo 'Installing homebrew'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

echo 'Installing fortune and ponysay
brew install fortune ponysay

echo "if [ -x /usr/local/bin/ponysay -a -x /usr/local/bin/fortune ]; then\n
    fortune | ponysay\n
fi\n" >> ~/.bashrc