Search code examples
iterm2

How do I configure iTerm2 to open URLs in a specific browser?


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?


Solution

  • 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
    

    enter image description here

    Once you do this, this action will override the built-in default of using the system defined app (Safari in your case).