Zsh completions: complete multiple option arguments

This commit is contained in:
Paul Ouellette
2019-07-18 16:16:58 -04:00
parent 11ae9b8bdf
commit 397c1fd739

View File

@@ -1308,9 +1308,12 @@ function Parser:_zsh_arguments(buf, cmd_name, indent)
if option._description then
table.insert(line, "[" .. get_short_description(option) .. "]")
end
if option._maxargs == math.huge then
table.insert(line, ":*")
end
if option._choices then
table.insert(line, ": :(" .. table.concat(option._choices, " ") .. ")")
elseif option._minargs > 0 then
elseif option._maxargs > 0 then
table.insert(line, ": :_files")
end
table.insert(line, '"')