1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-22 07:39:48 +00:00

Useless use of cat for fzf completion

This commit is contained in:
BarbUk
2019-02-05 18:19:20 +04:00
parent 655fbe5834
commit e06daee0a7

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'