From d9cb3ec5bf17c4762b0e69890c0d1362f5ade0f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Aug 2026 07:32:50 +0000 Subject: [PATCH] docs: update cli:option @param docstring to document table default for multi-value options --- src/cliargs/core.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cliargs/core.lua b/src/cliargs/core.lua index 1926468..1caedfc 100644 --- a/src/cliargs/core.lua +++ b/src/cliargs/core.lua @@ -400,11 +400,17 @@ local function create_core() --- --- A description for the argument to be shown in --help. --- - --- @param {bool} [default=nil] + --- @param {string|table} [default=nil] --- --- A default value to use in case the option was not specified at --- run-time (the default value is nil if you leave this blank.) --- + --- If you pass a **table** (e.g. `{}` or `{ "value1" }`), the + --- option will accept multiple values: each invocation of the flag + --- appends the supplied value to that table. The pre-populated + --- table entries serve as the default list when the option is never + --- supplied on the command-line. + --- --- @param {function} [callback] --- --- A callback to invoke when this option is parsed.