kerma / defaultbrowser

Command line tool for getting and setting a default browser (HTTP handler) in macOS
MIT License
310 stars 35 forks source link

Patch to mark Chrome browser #26

Closed jonasbn closed 1 week ago

jonasbn commented 10 months ago

I experience that the Chrome browser is not marked when set as default browser.

With Firefix Developer Edition set as the default browser:

defaultbrowser
  iterm2
  browser
  kitty
  chrome
* firefoxdeveloperedition
  safari

With Chrome set as the default browser:

defaultbrowser
  iterm2
  browser
  kitty
  chrome
  firefoxdeveloperedition
  safari

So this patch implements case insensitive string comparison, since the comparisons of the strings: chrome and Chrome seems to be the issue.

Do not I am not an Objective-C programmer, so feel free to come with suggestions or edit the proposal or reject it all together.

The patch also enables the warning when attempting to set the Chrome browser as default twice, currently it is silent.