Skip to content

Commit 1d76b3a

Browse files
purefunNTBBloodbath
authored andcommitted
fix: yank curl command which includes double quotes
1 parent aa9cd8c commit 1d76b3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/rest-nvim/curl/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ M.curl_cmd = function(opts)
139139
local curl_cmd = format_curl_cmd(res)
140140

141141
if config.get("yank_dry_run") then
142-
vim.cmd('let @+="' .. curl_cmd .. '"')
142+
vim.cmd("let @+=" .. string.format("%q", curl_cmd))
143143
end
144144

145145
log.debug("[rest.nvim] Request preview:\n" .. curl_cmd)

0 commit comments

Comments
 (0)