Append slash on true local directories

A slash must only be added if the current completion item starts with
`./` and is actually a directory.
This commit is contained in:
Florian Gamböck 2017-07-10 20:50:04 +02:00
parent 7c677e01cc
commit 0bd74b4f72
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
local line = c:read("*line")
if not line then break end
if gfs.is_dir(line) then
if str_starts(line, "./") and gfs.is_dir(line) then
line = line .. "/"
end
table.insert(output, bash_escape(line))