Merge pull request #34 from BarbUk/fix/useless_cat

Useless use of cat for fzf completion
This commit is contained in:
Linwei authored and GitHub committed 2019-02-05 23:24:22 +08:00
commit 642549b7a5
1 file changed
+1 -1
+1 -1
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'