I recently changed my default browser from Chrome to Safari, but I still do development in Chrome. I'd like URLs in iTerm2 to open up in Chrome, but now they open in Safari since its my system default.
Is it possible to change this?
You can add a Context Menu option for the smart selection of a URL for Chrome via the Edit Actions
of the Smart Selection Rules
(within a given profile) with a parameter of:
open -a "Google Chrome" \0
Once you do this, this action will override the built-in default of using the system defined app (Safari in your case).
If you are trying to open http://localhost:#PORT
, it might be necessary to add in Smart Selection Rules
a new rule with Regular Expression of https?://localhost(:[a-zA-Z0-9]+)?
and Precision of Very High
, before applying @SushiHangover's answer.
The default HTTP URL
rule does not appear to recognize http://localhost
well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With