当我运行该命令时open -ga /Applications/Google_Chrome.app http://example.com,应用程序正常运行并在Chrome中打开URL而不将应用程序带到前台。
但是如果我在open -ga /Applications/Google_Chrome.app没有指定url的情况下运行命令,则应用程序将在前台打开。
但是open -ga /Applications/Safari.app,无论是否指定了URL,运行都按预期工作,并且不会将应用程序带到前台。
从open手册页
-a applicationSpecifies the application to use for opening the file
-gDo not bring the application to the foreground
当-g选项通过时,为什么Chrome仍然在前台打开?我怎么能不这样做呢?