hunter icon indicating copy to clipboard operation
hunter copied to clipboard

MacOS `open` instead of `xdg-open`

Open thezealousfool opened this issue 5 years ago • 1 comments

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

thezealousfool avatar May 28 '20 03:05 thezealousfool

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.

rabite0 avatar May 28 '20 09:05 rabite0