Skip to content

Commit 430fa73

Browse files
committed
chore: do not print fzf cmd with debug={1|2}
1 parent 79fbe36 commit 430fa73

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lua/fzf-lua/fzf.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function M.raw_fzf(contents, fzf_cli_args, opts)
116116
-- })
117117
end
118118

119-
if opts.debug then
119+
if opts.debug and type(opts.debug) ~= "number" then
120120
utils.info("FZF_DEFAULT_COMMAND: %s", tostring(FZF_DEFAULT_COMMAND))
121121
utils.info("fzf cmd: %s", table.concat(cmd, " "))
122122
end

lua/fzf-lua/libuv.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,14 @@ M.spawn_stdio = function(opts)
412412
local argv = function(i)
413413
local idx = tonumber(i) or #_G.arg
414414
local arg = _G.arg[idx]
415-
if opts.debug == "v" or opts.debug == "verbose" then
415+
if opts.debug == "v" or opts.debug == 2 then
416416
io.stdout:write(("[DEBUG] raw_argv(%d) = %s" .. EOL):format(idx, arg))
417417
end
418418
-- TODO: maybe not needed anymore? since we're not using v:argv
419419
if FzfLua.utils.__IS_WINDOWS then
420420
arg = M.unescape_fzf(arg, FzfLua.utils.has(opts, "fzf", { 0, 52 }) and 0.52 or 0)
421421
end
422-
if opts.debug == "v" or opts.debug == "verbose" then
422+
if opts.debug == "v" or opts.debug == 2 then
423423
io.stdout:write(("[DEBUG] esc_argv(%d) = %s" .. EOL):format(idx, M.shellescape(arg)))
424424
end
425425
return arg
@@ -445,7 +445,7 @@ M.spawn_stdio = function(opts)
445445
opts.no_ansi_colors = true
446446
end
447447

448-
if opts.debug == "v" or opts.debug == "verbose" then
448+
if opts.debug == "v" or opts.debug == 2 then
449449
for k, v in vim.spairs(opts) do
450450
io.stdout:write(string.format("[DEBUG] %s=%s" .. EOL, k, vim.inspect(v)))
451451
end

lua/fzf-lua/make_entry.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ local function load_config_section(s, datatype, optional)
6363
ok, res = pcall(loadstring, res)
6464
end
6565
---@diagnostic disable-next-line: undefined-field
66-
if _G._debug == "v" or _G._debug == "verbose" then
66+
if _G._debug == "v" or _G._debug == 2 then
6767
---@diagnostic disable-next-line: undefined-field
6868
io.stdout:write(("[DEBUG] [load_config] %s = %s" .. (_G._EOL or "\n"))
6969
:format(s, not ok and errmsg or res))

0 commit comments

Comments
 (0)