Mac OS X: Bring GUI applications to foreground when launched from the command line

那年仲夏 提交于 2019-12-19 08:30:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!