James Duffy

Make opening your terminal fun

featured.png

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:

1
2
3
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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/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