Enable using custom commands in os_open_link
#1017
Labels
feature
Issues related to feature proposals. Please attach a module.
os_open_link
#1017
Issues
Feature description
Pull request #963 added support for using
explorer.exe
on wsl, which works magnificantly for me when trying to open a web url. However, it is less so when I am trying to open afile://
link.If I have a link to a file, say
C:/file.txt
, an url pointing to it in neorg when used on wsl would look like:{file:///mnt/c/file.txt}
, whichexplorer.exe
would not recognize.One solution to this is changing the url to windows-styled ones, like
{file:///C:/file.txt}
, but this means that completion for file path would not work for me as the path is incomprehensible to the linux system. Also, it might be tricky to open files located in wsl with programs installed on my Windows system.Currently, I use the
wslview
command for opening files on wsl (see https://wslutiliti.es/wslu/), and my temporary workaround for replacing the defaultexplorer.exe
isalias explorer.exe=wslview
. However, it is obvious that this is far from being a nice solution, and it appears to me that a better way is adding support in neorg by allowing the user to specify what command they want to open link.Help
Yes
Implementation help
I think we might add an
vim.g.neorg_open_link_command
value and have the user configure that value. Then, in theos_open_link
function inlua/neorg/modules/core/esupports/hop/module.lua
, we might add something like:The text was updated successfully, but these errors were encountered: