Replace os.execute with gfs function

This commit is contained in:
Florian Gamböck 2017-07-02 16:18:55 +02:00
parent e8ad3a32f5
commit 7c677e01cc
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ function completion.shell(command, cur_pos, ncomp, shell)
while true do while true do
local line = c:read("*line") local line = c:read("*line")
if not line then break end if not line then break end
if os.execute("test -d " .. string.format('%q', line)) == 0 then if gfs.is_dir(line) then
line = line .. "/" line = line .. "/"
end end
table.insert(output, bash_escape(line)) table.insert(output, bash_escape(line))