emacs file.txt &
But you can't run 'proper' OS X applications like that. There is, however, a command called open which can help. Here is how you would rewrite the Linux example above using open:
open -a emacs file.txt
The -a switch tells open which application you want to use to open file.txt and it automatically looks in the Applications folder for it. Note that you don't need the ampersand on the end of the line as OS X appears to fork the application for you.
From there it is pretty easy to set up an alias to do all that for you. Simply add the following line to your .bashrc:
alias emacs='open -a emacs'
Nice.
No comments:
Post a Comment