mortenn / BrowserPicker

Smart browser selector for Windows
MIT License
242 stars 17 forks source link

Set default browser if no match on any filter #88

Closed thheg closed 5 months ago

thheg commented 1 year ago

In my use case, I have some URLs that I want to open in Edge. The rest I want to open in Chrome and don't need a popup for this. I tried with |regex| .*, but then everything opened in Chrome. I see that in the reedme it is described that it will match on the longest, but isn't more logical to have it on the shortest? so that you can create a hierarchy of filters. E.g. have one filter on github.com/mortenn for Edge, but have another for github.com for Opera. So that all github.com pages in except github.com/mortenn is opened in opera and github.com/mortenn in Edge

mortenn commented 1 year ago

Yes, that is how it is supposed to work, "the longest match" means the most specific patterns that matches will be picked. If it matched the shortest hit first, then github.com/mortenn would not work if there was a rule for github.com as well.

thheg commented 1 year ago

Thanks for answering! Ok, then I misunderstood what longest matched meant. But I still I set a filter on |regex| .* for chrome, Atlassian links are open in Chrome even if I have a filter on atlassian.net for Edge. Do you have an example of a default fallback filter that works on all link except those that are more specifed

thomasfrobieter commented 1 year ago

I also need this, the majority of links should be opened in Firefox in my case, tried "" and "|regex| ." but the selection still appears.

mortenn commented 5 months ago

Hello, I've just rewritten the configuration part of the app and upgraded it to .NET 8, if you would be so kind as to give this build a try, that'd be great!

molohov commented 5 months ago

I just tried this feature on the latest build, but then realized I didn't want it. However, once it is set, you cannot unset it. Could you add that feature in as well?

mortenn commented 5 months ago

it should be unsettable in 2.0.2 or the latter builds, there was a bug early on where it wasn't clearable

mortenn commented 5 months ago

This has been implmented in 2.0.1+