Return completions as a string in get function

This commit is contained in:
Paul Ouellette
2019-05-31 12:10:59 -04:00
parent 8e04dc6eca
commit c96637b1d7

View File

@@ -247,7 +247,7 @@ local add_complete = {"add_complete", function(self, value)
:args(1)
:choices {"bash", "zsh", "fish"}
:action(function(_, _, shell)
self["get_" .. shell .. "_complete"](self)
print(self["get_" .. shell .. "_complete"](self))
os.exit(0)
end)
@@ -1201,7 +1201,7 @@ function Parser:get_fish_complete()
self:_fish_complete_help(lines, prefix)
io.write(table.concat(lines, "\n"), "\n")
return table.concat(lines, "\n")
end
local function get_tip(context, wrong_name)