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