`open -a` results in an "Unable to find application" error on OS X
I would like to create a shortcut in my .profile
file in OS X Lion to launch the iWork program "Numbers".
The application is in:
/Applications/iWork '09/Numbers.app
I created this shortcut:
alias psd="open -a Adobe\ Photoshop\ CS3"
It works fine to open Photoshop. So I created:
alias num="open -a iWork\ \'09/Numbers"
When I type "num" I get an error:
Unable to find application named 'iWork '09/Numbers'.
I don't think it's a problem of backslashes before the space or the quote because I have tried countless variations to no avail. I also tried adding ".app" to the application name, but got the same error message.
How can I create this alias?
Have you considered the following?
open -a Numbers
Applications opened by open
aren't opened relative to their path, but just according to their actual name, as identified in Contents/Info.plist
in the .app
file itself.
If you want to be sure, you can also use the Bundle Identifier with the -b
option:
open -b com.apple.iTunes
Which can be found in the Info.plist
file too: