aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-09-08 18:45:30 +0200
committerRandy Palamar <randy@rnpnr.xyz>2024-09-13 06:03:59 -0600
commitc569e85f6a1521b30437335b247732f6af635a61 (patch)
tree9130815ccdc39a4c3cd8994004de0a073263a800
parentc56b57fc58c73e96def91f4904d5b6e7c50e3de9 (diff)
downloadvis-c569e85f6a1521b30437335b247732f6af635a61.tar.gz
vis-c569e85f6a1521b30437335b247732f6af635a61.tar.xz
complete-word: pipe the candidates directly to the command
-rw-r--r--lua/plugins/complete-word.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/lua/plugins/complete-word.lua b/lua/plugins/complete-word.lua
index 5e355e8..511b47e 100644
--- a/lua/plugins/complete-word.lua
+++ b/lua/plugins/complete-word.lua
@@ -24,8 +24,7 @@ vis:map(vis.modes.INSERT, "<C-n>", function()
if #candidates == 1 and candidates[1] == "\n" then return end
candidates = table.concat(candidates, "\n")
- local cmd = "printf '" .. candidates .. "' | sort -u | vis-menu"
- local status, out, err = vis:pipe(cmd)
+ local status, out, err = vis:pipe(candidates, "sort -u | vis-menu")
if status ~= 0 or not out then
if err then vis:info(err) end
return