From 1358d08273f903d2a3caf4e93df1a078d302023c Mon Sep 17 00:00:00 2001 From: Clarence Date: Fri, 30 Aug 2024 13:10:16 +0800 Subject: [PATCH] fix: wl-copy copies literal string `< [filename].png` --- lua/freeze-code/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/freeze-code/commands.lua b/lua/freeze-code/commands.lua index 439d895..ca48276 100644 --- a/lua/freeze-code/commands.lua +++ b/lua/freeze-code/commands.lua @@ -121,7 +121,7 @@ local copy_by_os = function(opts) if vim.env.XDG_SESSION_TYPE == "x11" then cmd = { "xclip", "-selection", "clipboard", "-t", "image/png", "-i", filename } else - cmd = { "wl-copy", "<", filename } + cmd = { "sh", "-c", "wl-copy <" .. filename } end end return vim.fn.system(cmd)