From 0bd74b4f722c0d94d96b374cf2c3466b2b3c570a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Gamb=C3=B6ck?= Date: Mon, 10 Jul 2017 20:50:04 +0200 Subject: [PATCH] Append slash on true local directories A slash must only be added if the current completion item starts with `./` and is actually a directory. --- lib/awful/completion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful/completion.lua b/lib/awful/completion.lua index db4f7a95..c62f22c0 100644 --- a/lib/awful/completion.lua +++ b/lib/awful/completion.lua @@ -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))