From 51e5381b67f467a30b95709bc07a74374a1cfe17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Gamb=C3=B6ck?= Date: Sun, 2 Jul 2017 16:11:31 +0200 Subject: [PATCH] Check for local directory completion A directory in the current working directory (starting with `./`) should be completed with a slash appended. --- spec/awful/completion_spec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/awful/completion_spec.lua b/spec/awful/completion_spec.lua index d1159a18a..434582e69 100644 --- a/spec/awful/completion_spec.lua +++ b/spec/awful/completion_spec.lua @@ -181,6 +181,20 @@ describe("awful.completion.shell", function() it("completes command regardless of local directory (nil)", function() assert.same(shell('true', 5, 1, nil), {'true', 5, {'true'}}) end) + + if has_bash then + it("completes local directories starting with ./ (bash)", function() + assert.same(shell('./just', 7, 1, 'bash'), {'./just_a_directory/', 20, {'./just_a_directory/'}}) + assert.same(shell('./t', 4, 1, 'bash'), {'./true/', 8, {'./true/'}}) + end) + end + if has_zsh then + it("completes local directories starting with ./ (zsh, non-empty)", function() + assert.same(shell('./just', 7, 1, 'zsh'), {'./just_a_directory/', 20, {'./just_a_directory/'}}) + assert.same(shell('./t', 4, 1, 'zsh'), {'./true/', 8, {'./true/'}}) + end) + end + --]] end) describe("awful.completion.shell handles $SHELL", function()