Tools: July 2010 Archives
I work in my OS X Terminal window all day long. When I want to run iCal or Address Book, I don't want to be bothered with clicking around to find the app, even though they live in my Dock. I could also use a program launcher like Alfred, which I like, but want it even faster.
For me, the fastest way to open iCal while I'm in the shell is to run "ical" from the prompt, which launches the app.
My ~/bin/ical program is simply
#!/bin/sh
open /Applications/iCal.app/
and my ~/bin/addr is
#!/bin/sh
open "/Applications/Address Book.app/"
You might think that it's overkill to write a shell program for such a silly task, but it's all about optimizing my time at the keyboard for my common cases.
Someone will note that I could have used a shell alias, and that's true, too. Either way, I want a super simple way to get the apps I use most often.
Ever open up a Terminal window and hit Tab and Bash sits for a few seconds until it finally comes back and asks
Display all 2224 possibilities? (y or n)
Because it went and compiled a list of EVERY executable you could possibly want to execute?
Yeah, me, too, and I hate it. The fix is simple. Add this to your ~/.bashrc
shopt -s no_empty_cmd_completion
No more completion on nothing!