I wanted to use this in a python script so I was hoping to find a silent way to change my default browser, without the annoying pop-up.
I tried using sudo defaultbrowser -set <browser> but it doesn't set the browser in that case and it's probably a bad idea too.