vis-config

lua scripts to configure vis editor

git clone https://9o.is/git/vis-config.git

commit 0dc1ef92cb76873c5aaa416d73207235336a62d9
parent a2e2a866f1c80d1ca7954d1fdceba2add2fd0610
Author: Jul <jul@9o.is>
Date:   Mon, 26 Jan 2026 01:18:16 -0500

use popen with explore command

Diffstat:
Mlib/search.lua | 15++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/lib/search.lua b/lib/search.lua @@ -3,8 +3,8 @@ local session = require('lib/session') local M = { find = 'ag -g . {path} | fzy', dfind = 'find {path} -type d | fzy | xargs -r fe', - grep = "ag --vimgrep --smart-case {pattern} {path} | fzy", - explore = 'fe', + grep = 'ag --vimgrep --smart-case {pattern} {path} | fzy', + explore = 'fe {path}', grep_wrap = '"', } @@ -69,15 +69,8 @@ vis:command_register('grep', function(argv, _, win) end, 'Grep') vis:command_register('explore', function(argv, force, win) - local path = './'..(win.file.name or '') - - local status, out, err = vis:pipe(path, M.explore, true) - if status ~= 0 then - return false - end - win.navigate(out) - vis:redraw() - return true; + local command = M.explore:gsub('{path}', './'..(win.file.name or '')) + return run(command, win.navigate) end, 'Explore') vis:command_register('mru', function(argv, force, win)