Skip to content

Commit

Permalink
complete-word: pipe the candidates directly to the command
Browse files Browse the repository at this point in the history
  • Loading branch information
fischerling committed Sep 8, 2024
1 parent d8db15f commit 2efe3f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/plugins/complete-word.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2efe3f3

Please sign in to comment.