Search code examples
macosbashterminal

Is there a way to revert back to the command line after opening an application through it?


I want to be able to open an application on the command line, but instead of switching to the application, I want to stay on my terminal emulator. Is there a way of accomplishing this? I am using OS X.


Solution

  • Use the -g flag of open, which avoids bringing the app to the foreground.

    $ open -g /Applications/TextEdit.app
    $
    

    open will start the app, and then return to the command prompt.