carbon-now.nvim icon indicating copy to clipboard operation
carbon-now.nvim copied to clipboard

Can't open carbon uri on Windows with default shell (cmd)

Open Lougnar opened this issue 10 months ago • 0 comments

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 = ''

Lougnar avatar Apr 09 '24 22:04 Lougnar