diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-09-08 18:45:30 +0200 |
|---|---|---|
| committer | Randy Palamar <randy@rnpnr.xyz> | 2024-09-13 06:03:59 -0600 |
| commit | c569e85f6a1521b30437335b247732f6af635a61 (patch) | |
| tree | 9130815ccdc39a4c3cd8994004de0a073263a800 | |
| parent | c56b57fc58c73e96def91f4904d5b6e7c50e3de9 (diff) | |
| download | vis-c569e85f6a1521b30437335b247732f6af635a61.tar.gz vis-c569e85f6a1521b30437335b247732f6af635a61.tar.xz | |
complete-word: pipe the candidates directly to the command
| -rw-r--r-- | lua/plugins/complete-word.lua | 3 |
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 |
