open -g命令仍然在前台打开应用程序


2

当我运行该命令时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 application Specifies the application to use for opening the file

-g Do not bring the application to the foreground

-g选项通过时,为什么Chrome仍然在前台打开?我怎么能不这样做呢?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.