aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-11-01 13:03:30 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2024-11-01 13:03:30 +0100
commit6dc4d83ba0647df4d5bee733d63e29c4b679dd16 (patch)
tree5961962218a95b64f918135d296dcd7b70120a54
parentb0e4215ec52acc07b1ff15b1bcc7562e1cdbf7c3 (diff)
downloadvis-lockfiles-6dc4d83ba0647df4d5bee733d63e29c4b679dd16.tar.gz
vis-lockfiles-6dc4d83ba0647df4d5bee733d63e29c4b679dd16.zip
use the new vis:pipe API to pipe the choices directly to the vis-menuHEADmain
-rw-r--r--init.lua6
1 files 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)