openwrt/package/utils/cli/files
Felix Fietkau 3ae669b656 cli: use the defaults for available in the parameter name list
complete_named_params() computes the defaults and then calls the
available callback with the given parameters alone. A parameter that
is available only through a default of another parameter is missing
from the name list, in both spellings, while the command accepts it.

Show the callback the same view as the command does, with a given value
ahead of the default. Reuse the defaults that default_complete() holds.
A parameter with a default stays in the name list until it is given.

No available callback in the tree reads a default yet. Found by
inspection.

Fixes: 248b66b44f ("cli: add OpenWrt CLI")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-11-15 11:17:20 +00:00
..
usr cli: use the defaults for available in the parameter name list 2026-11-15 11:17:20 +00:00