Reputation: 79268
Say I have a terminal command (such as a make target) that opens a browser window (on a mac):
open http://localhost:3000/
By default, that open
opens a browser window and now we're focused on the browser window. Is there a way instead to keep the focus on the current terminal window? (or bring the focus back to the terminal window somehow)
Upvotes: 2
Views: 772
Reputation: 531205
You are looking for the -g
option to open
(although I don't know what mnemonic g
is supposed to represent):
-g Do not bring the application to the foreground.
So you can simply use
open -g http://localhost:3000/
Upvotes: 3