File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -309,10 +309,14 @@ M.live_grep = function(opts)
309309 local query = s [1 ] or " "
310310 opts .no_esc = nil
311311 local cmd0 = get_grep_cmd (opts , query , true )
312- return core .can_transform (opts ) and
313- (" reload:" .. (
314- not opts .exec_empty_query and # query == 0 and FzfLua .utils .shell_nop () or cmd0 ))
315- or cmd0
312+ if not core .can_transform (opts ) then return cmd0 end
313+ -- "reload:cmd"
314+ if not opts .exec_empty_query and # query == 0 then
315+ cmd0 = FzfLua .utils .shell_nop ()
316+ elseif opts .silent_fail ~= false then
317+ cmd0 = cmd0 .. " || " .. FzfLua .utils .shell_nop ()
318+ end
319+ return " reload:" .. cmd0
316320 end , opts )
317321end
318322
Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ _G.FzfLua = require("fzf-lua")
164164--- @field no_resume boolean ?
165165--- @field profile string | table ?
166166--- @field fn_reload boolean ? is " live" picker
167+ --- @field silent_fail boolean ?
167168--- set_headers
168169--- @field _headers string[] ?
169170--- @field headers string[] ?
You can’t perform that action at this time.
0 commit comments