From 27436a995cc1e71c50c5d9b186ebdbc1a25d53cb Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 11 Jan 2023 15:02:36 +0100 Subject: make vis-menu and vertical selection the default menu cmd --- init.lua | 3 +-- lspc.lua | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 2f6351c..c85df1e 100644 --- a/init.lua +++ b/init.lua @@ -362,14 +362,13 @@ local function lspc_select(choices) local cmd = 'printf "' .. menu_input .. '" | ' .. lspc.menu_cmd lspc.log('collect choice using: ' .. cmd) - if lspc.menu_cmd == 'vis-menu' then + if lspc.menu_cmd:sub(0, 8) == 'vis-menu' then status, output = vis:pipe(vis.win.file, {start = 0, finish = 0}, cmd) else local menu = io.popen(cmd) output = menu:read('*a') local _, _, _status = menu:close() status = _status - end local choice = nil diff --git a/lspc.lua b/lspc.lua index 299c2a2..7894507 100644 --- a/lspc.lua +++ b/lspc.lua @@ -13,7 +13,7 @@ local lspc = { autostart = true, -- program used to let the user make choices -- The available choices are pass to on stdin separated by '\n' - menu_cmd = 'vis-menu', + menu_cmd = 'vis-menu -l 10', -- program used to ask the user for confirmation confirm_cmd = 'vis-menu', -- cgit v1.2.3