mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 11:02:20 +00:00
Return completions as a string in get function
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user