carbon-now.nvim
carbon-now.nvim copied to clipboard
Can't open carbon uri on Windows with default shell (cmd)
The plugin doesn't work with cmd shell with windows.
vim.opt.shell is cmd.exe by default.
Todo:
-
Using single quote doesn't work in cmd, it must be double quotes.
-
The command break when the uri contain special chars which is our case. We need to pass uri as second argument to start function in cmd :
start "" "<URI>"
. https://superuser.com/questions/36728/can-i-launch-urls-from-command-line-in-windows/36730#36730
Workaround:
Setting vim shell to powershell in lua file:
-- you may want replace pwsh with powershell to use default windows powershell
vim.opt.shell = 'pwsh'
vim.opt.shellcmdflag = '-command'
vim.opt.shellxquote = ''