hunter
hunter copied to clipboard
MacOS `open` instead of `xdg-open`
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 -
- A configuration option to allow the user set any custom command to open files by default
- Detect OS to be Mac at build time and replace
xdg-openwithopen
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.