Looks like a bash function to me!
I don't recall what a default instance of OS X looks like, but I suggest putting this in your
~ denotes your home directory. You username in the Finder, which ultimately amounts to
Since the filename begins with a dot, it is a hidden file. Which means there are a couple ways to edit it.
- You have to enable hidden files, and edit it with your favorite text editor. (Note also you might have to create it if it doesn't exist.)
You could use Secrets.app, or;
Per a MacWorld article;
Open Terminal, type this command, and press Enter:
defaults write com.apple.Finder AppleShowAllFiles YES
To make the command take effect, you need to restart the Finder. One way to do this is to hold down the Option key, then click and hold on the Finder icon in the Dock. When the contextual menu appears, select Relaunch and the Finder will restart.`
- You can use a command line editor to do the same.
Open/create the .bash_profile file, and add that function to it. Restart the terminal, use it!