mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
Zsh completions: complete multiple option arguments
This commit is contained in:
@@ -1308,9 +1308,12 @@ function Parser:_zsh_arguments(buf, cmd_name, indent)
|
|||||||
if option._description then
|
if option._description then
|
||||||
table.insert(line, "[" .. get_short_description(option) .. "]")
|
table.insert(line, "[" .. get_short_description(option) .. "]")
|
||||||
end
|
end
|
||||||
|
if option._maxargs == math.huge then
|
||||||
|
table.insert(line, ":*")
|
||||||
|
end
|
||||||
if option._choices then
|
if option._choices then
|
||||||
table.insert(line, ": :(" .. table.concat(option._choices, " ") .. ")")
|
table.insert(line, ": :(" .. table.concat(option._choices, " ") .. ")")
|
||||||
elseif option._minargs > 0 then
|
elseif option._maxargs > 0 then
|
||||||
table.insert(line, ": :_files")
|
table.insert(line, ": :_files")
|
||||||
end
|
end
|
||||||
table.insert(line, '"')
|
table.insert(line, '"')
|
||||||
|
Reference in New Issue
Block a user