zumoshi / BrowserSelect

Browser Select is a utility to dynamically select the browser you want instead of just having one default for all links.
GNU General Public License v2.0
289 stars 39 forks source link

feat: support Firfox profiles #73

Open perqin opened 3 years ago

perqin commented 3 years ago

See here for official documentation on Firefox profiles management.

zumoshi commented 3 years ago

Running a few more tests it seems firefox now correctly handles -p profile link. Interesting, It didn't do that before. We need to do some tests to detect which version has introduced this change and either auto-detect it or provide an option in case someone is still using a pre-Quantum firefox version.

The weird behavior of opening a new window without a link seems to have something to do with how Program.Args2Str escapes the arguments: image

That still doesn't explain the missing profile names though. But since there is now support in firefox for this I will merge it as soon as the issues are resolved.

perqin commented 3 years ago

I'll try resolving these issue later. It seems that there are some problems on Firefox handling link in specified profile.

lucasnz commented 3 years ago

This seems to work consistently for me: firefox.exe -P default -new-tab "http://www.example.com" See: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-new-tab_url

This option seems to have been around for a while now (seems to have worked back in Jan 2020) for this user; https://stackoverflow.com/a/59889290

Adding the new-tab parameter may ensure better (backward) support??