Check for command with directory in PWD
Even if there is a directory in the current working directory with the same name as a command, the directory must not be completed. So, if we want to complete "true" and there is a directory "true" in the current working directory, the completion list has to be just {"true"}, not {"true", "true/"}, or anything else!
This commit is contained in:
parent
c296a0b91d
commit
8a13f1cb75
|
@ -146,6 +146,20 @@ describe("awful.completion.shell", function()
|
||||||
assert.same(shell('ls l', 5, 1, 'zsh'), {'ls localcommand', 16, {'localcommand'}})
|
assert.same(shell('ls l', 5, 1, 'zsh'), {'ls localcommand', 16, {'localcommand'}})
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if has_bash then
|
||||||
|
it("completes command regardless of local directory (bash)", function()
|
||||||
|
assert.same(shell('true', 5, 1, 'bash'), {'true', 5, {'true'}})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
if has_zsh then
|
||||||
|
it("completes command regardless of local directory (zsh)", function()
|
||||||
|
assert.same(shell('true', 5, 1, 'zsh'), {'true', 5, {'true'}})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
it("completes command regardless of local directory (nil)", function()
|
||||||
|
assert.same(shell('true', 5, 1, nil), {'true', 5, {'true'}})
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe("awful.completion.shell handles $SHELL", function()
|
describe("awful.completion.shell handles $SHELL", function()
|
||||||
|
|
Loading…
Reference in New Issue