Skip to content

Commit 81c5256

Browse files
phanenibhagwan
authored andcommitted
Revert "fix: set TMPDIR for child to avoid lots of logging"
This reverts commit 922eff8.
1 parent 91fc218 commit 81c5256

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

lua/fzf-lua/libuv.lua

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,6 @@ M.expand = function(s)
666666
return vim.fn.expand(s)
667667
end
668668

669-
670-
local TMPDIR = vim.fn.fnamemodify(vim.fn.tempname(), ":h:h:h")
671-
672669
---@param opts string
673670
---@param fn_transform string?
674671
---@param fn_preprocess string?
@@ -683,17 +680,12 @@ M.wrap_spawn_stdio = function(opts, fn_transform, fn_preprocess, fn_postprocess)
683680
_is_win and [[set VIMRUNTIME=%s& ]] or "VIMRUNTIME=%s ",
684681
_is_win and vim.fs.normalize(vim.env.VIMRUNTIME) or M.shellescape(vim.env.VIMRUNTIME)
685682
)
686-
local tmp_dir = os.getenv("TMPDIR") and "" or string.format(
687-
_is_win and [[set TMPDIR=%s& ]] or "TMPDIR=%s ",
688-
_is_win and vim.fs.normalize(TMPDIR) or M.shellescape(TMPDIR))
689-
690683
local lua_cmd = ("lua %sloadfile([[%s]])().spawn_stdio(%s,%s,%s,%s)"):format(
691684
_has_nvim_010 and "vim.g.did_load_filetypes=1; " or "",
692685
vim.fn.fnamemodify(_is_win and vim.fs.normalize(__FILE__) or __FILE__, ":h") .. "/spawn.lua",
693686
opts, fn_transform, fn_preprocess, fn_postprocess
694687
)
695-
local cmd_str = ("%s%s%s -n --headless -u NONE -i NONE --cmd %s"):format(
696-
tmp_dir,
688+
local cmd_str = ("%s%s -n --headless -u NONE -i NONE --cmd %s"):format(
697689
nvim_runtime,
698690
M.shellescape(_is_win and vim.fs.normalize(nvim_bin) or nvim_bin),
699691
M.shellescape(lua_cmd)

lua/fzf-lua/shell.lua

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ end
4646
-- NOT USED ANYMORE, we use `vim.g.fzf_lua_server` instead
4747
-- local action_server_address = nil
4848

49-
local TMPDIR = vim.fn.fnamemodify(vim.fn.tempname(), ":h:h:h")
50-
5149
function M.raw_async_action(fn, fzf_field_expression, debug)
5250
if not fzf_field_expression then
5351
fzf_field_expression = "{+}"
@@ -92,10 +90,6 @@ function M.raw_async_action(fn, fzf_field_expression, debug)
9290
utils._if_win(path.normalize(vim.env.VIMRUNTIME),
9391
libuv.shellescape(vim.env.VIMRUNTIME)))
9492

95-
local tmp_dir = os.getenv("TMPDIR") and "" or string.format(
96-
utils._if_win([[set TMPDIR=%s& ]], "TMPDIR=%s "),
97-
utils._if_win(path.normalize(TMPDIR), libuv.shellescape(TMPDIR)))
98-
9993
local call_args = ("fzf_lua_server=[[%s]], fnc_id=%d %s"):format(
10094
vim.g.fzf_lua_server, id, debug and ", debug=true" or "")
10195

@@ -104,8 +98,7 @@ function M.raw_async_action(fn, fzf_field_expression, debug)
10498
-- special shell chars ('+', '-', etc), examples where this can
10599
-- happen are the `git status` command and git branches from diff
106100
-- worktrees (#600)
107-
local action_cmd = ("%s%s%s -n --headless -u NONE -i NONE --cmd %s -- %s"):format(
108-
tmp_dir,
101+
local action_cmd = ("%s%s -n --headless -u NONE -i NONE --cmd %s -- %s"):format(
109102
nvim_runtime,
110103
libuv.shellescape(path.normalize(nvim_bin)),
111104
libuv.shellescape(("lua %sloadfile([[%s]])().rpc_nvim_exec_lua({%s})"):format(

0 commit comments

Comments
 (0)