Opening Safari with URL via terminal also opens URL in default browser (Chrome)

When using the command open in the terminal, there seems to be this weird issue/behavior where if run to open a specific application (in this case Safari) where my current default browser is Chrome, the following command would open up in both Safari and my default browser.

open -a /Application/Safari.app/ https://www.google.com

Opening up a different browser, such as Firefox does not have this issue. In that case, only the specified application does run as expected.

open -a /Application/Firefox.app/ https://www.google.com

open -a Firefox https://www.google.com

Is this a bug or a desired effect?

(Tested macOS 11.4)

Post not yet marked as solved Up vote post of kevin_axure Down vote post of kevin_axure
1.9k views

Replies

I have the same issue in Ventura 13.1 on my Mac Studio. Seems like a bug to me.

I'm observing the described behavior on my Mac M1 (13.5.1) as well.

Surely this cannot be intentional.

  • Some more information on this: This only happens if Safari is closed at the time the command is executed. If an instance of Safari is running at that time, the command behaves correctly and only opens the URL in Safari.

Add a Comment