Low-tech high-speed OS X program launching

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

open /Applications/iCal.app/

and my ~/bin/addr is

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.



even easier than that, you can just press command-space which open the spotlight search tool, and start writing the name of the application you want to use.

Andy Lester said:

Spotlight is just too laggy for me as a launcher. I know some people use it, but with all the other stuff it has to do, I don't like it.

Here's an article I wrote about using the Spotlight database from the command line using the mdfind command and some Perl: http://www.oreillynet.com/pub/a/mac/2006/01/04/mdfind.html

RyanPeterson said:

This sounds similar to something I have been trying to do on my Mac. I've been doing stuff like this on Linux forever, but I haven't had much luck on OSX yet.

Basically, I use MacVim for just about everything. As a Linux user I'm accustomed to doing something like "vim file.txt" on the command line.

In OSX the closest I've come to this is "/Applications/MacVim.app/Contents/MacOS/MacVim file.txt" which feels incredibly cumbersome - and, honestly, like I'm missing something potentially obvious that many other OSX users probably know about.

Mike Stok said:

Ryan - there's a small mvim wrapper script in the MacVim package which you can put somewhere in your path and then just do

mvim filename

to edit files. IF you're running snow leopard then there's a MacVim which uses vim 7.3 at http://code.google.com/p/macvim/ which contains the shell script in the tar archive.

Leave a comment

About this Entry

This page contains a single entry by Andy Lester published on July 19, 2010 2:40 PM.

Fixing my #1 bash annoyance was the previous entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Other Perl Sites

Other Swell Blogs

  • geek2geek: An ongoing analysis of how geeks communicate, how we fail and how to fix it.