mirror of
https://github.com/skywind3000/z.lua
synced 2026-03-12 10:49:49 +00:00
Merge pull request #216 from chrisant996/fix_invalid_path_on_window
Fix invalid pathname in `z -I xyz` on Windows.
This commit is contained in:
4
z.lua
4
z.lua
@@ -1676,7 +1676,7 @@ function z_cd(patterns)
|
||||
end
|
||||
cmd = cmd .. ' < "' .. tmpname .. '"'
|
||||
else
|
||||
tmpname = os.tmpname():gsub('\\', ''):gsub('%.', '')
|
||||
tmpname = os.tmpname():gsub('[\\:]', ''):gsub('%.', '')
|
||||
tmpname = os.environ('TMP', '') .. '\\zlua_' .. tmpname .. '.txt'
|
||||
cmd = 'type "' .. tmpname .. '" | ' .. cmd
|
||||
end
|
||||
@@ -1873,7 +1873,7 @@ function cd_breadcrumbs(pwd, interactive)
|
||||
if not windows then
|
||||
tmpname = os.tmpname()
|
||||
else
|
||||
tmpname = os.tmpname():gsub('\\', ''):gsub('%.', '')
|
||||
tmpname = os.tmpname():gsub('[\\:]', ''):gsub('%.', '')
|
||||
tmpname = os.environ('TMP', '') .. '\\zlua_' .. tmpname .. '.txt'
|
||||
end
|
||||
fp = io.open(tmpname, 'w')
|
||||
|
||||
Reference in New Issue
Block a user