rabite0 / hunter

The fastest file manager in the galaxy!
Do What The F*ck You Want To Public License
1.32k stars 64 forks source link

MacOS `open` instead of `xdg-open` #95

Open thezealousfool opened 4 years ago

thezealousfool commented 4 years ago

In MacOS, the open command is used in the place of xdg-open. I see the xdg-open command has been hard coded in file_browser.rs. Possible solutions include -

  1. A configuration option to allow the user set any custom command to open files by default
  2. Detect OS to be Mac at build time and replace xdg-open with open
rabite0 commented 4 years ago

There's a pull request to make the opener configurable. I'm waiting on the author to respond to my suggested changes, but I might just pull and fix it up myself.

The default should probably not be hard-coded either, but depend on the OS and what's available on the system. Doesn't have to be a compile time thing, it could just check for (xdg)-open, ranger's rifle and maybe others and use what's available by setting it as default option if no opener was set explicitly.