1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-20 14:49:55 +00:00

Merge pull request #34 from BarbUk/fix/useless_cat

Useless use of cat for fzf completion
This commit is contained in:
Linwei
2019-02-05 23:24:22 +08:00
committed by GitHub

2
z.lua
View File

@@ -1404,10 +1404,10 @@ function z_cd(patterns)
local cmd = ((not fzf) and 'fzf' or fzf) .. ' ' .. cmd
if not windows then
tmpname = os.tmpname()
cmd = 'cat "' .. tmpname .. '" | ' .. cmd
if not os.getenv('_ZL_FZF_FULLSCR') then
cmd = cmd .. ' --height 35%'
end
cmd = cmd .. ' < "' .. tmpname .. '"'
else
tmpname = os.tmpname():gsub('\\', ''):gsub('%.', '')
tmpname = os.getenv('TMP') .. '\\zlua_' .. tmpname .. '.txt'