From 6dc4d83ba0647df4d5bee733d63e29c4b679dd16 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 1 Nov 2024 13:03:30 +0100 Subject: use the new vis:pipe API to pipe the choices directly to the vis-menu --- init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index af96399..e25e0d3 100644 --- a/init.lua +++ b/init.lua @@ -44,10 +44,8 @@ local function prompt_backend_whiptail(msg, menu) end local function prompt_backend_vis_menu(msg, menu, choices) - local cmd1 = 'printf >/dev/tty %s \'' .. msg .. '\n\'' - local cmd2 = 'printf %s \'' .. choices .. '\'' - local cmd3 = 'vis-menu -b -p \'' .. menu .. '\'' - return vis:pipe(cmd1 .. ';' .. cmd2 .. '|' .. cmd3, true) + os.execute('printf >/dev/tty %s \'' .. msg .. '\n\'') + return vis:pipe(choices, 'vis-menu -b -p \'' .. menu .. '\'', true) end local function prompt_backend(path, lfile_path, pid, backend) -- cgit v1.2.3