In OS X, how to open an application with command line arguments?
August 10, 2008 10:01 AM
Subscribe
OS X terminal help. How do I open an application with command line arguments?
Application FOO supports a number of command line arguments. From OS X's terminal,
$ open FOO.app (this works fine)
$ open FOO.app -r
open [470] No such file: /Users/Izner Myletze/ -r
$ open 'FOO.app -k'
open[471] No such file: /Users/Izner Myletze/FOO.app -k
How do I start FOO with -r or -k?
posted by Izner Myletze to computers & internet (6 comments total)
4 users marked this as a favorite
Sometimes, you want to launch a separate process of Carbon Emacs or Aquamacs, and want to pass it command line arguments. You can do like this: nohup /Applications/Emacs.app/Contents/MacOS/Emacs -q &.
that seems to imply that you have to search inside the ".app" directory (bundle) to find the executable, and invoke it yourself (nohup is irrelevant here - it's just to stop the application exiting when you close the console window).
posted by not sure this is a good idea at 10:20 AM on August 10, 2008