问题
Is there a way to bring GUI applications to the foreground when starting them from within Terminal on Mac OS X? If I run
/Applications/TextEdit.app/Contents/MacOS/TextEdit
in Terminal, TextEdit opens in the background. This is quite annoying if you're using "make && ./run" when developing GUI applications.
回答1:
At least for TextEdit and similar GUI apps, open will work:
> open /Applications/TextEdit.app
回答2:
There seems to be even shorter variant:
> open -a TextEdit
来源:https://stackoverflow.com/questions/7779454/mac-os-x-bring-gui-applications-to-foreground-when-launched-from-the-command-li