Skip to content

bug: honor defaults on repeatable positional declarations #507

Description

@codeforester

Goal

honor defaults on repeatable positional declarations.

Background and verified evidence

Review date: 2026-09-17. Reviewed commit: 38042cbf23b9380c626aae6c9fe168f97096c1cc. Parent: #214.

base_cli_positional p "" things repeatable=true default=fallback succeeds, but base_cli_parse p -- returns 0 with an empty BASE_BASH_LIBS_CLI_RESULT_POSITIONALS. The repeatable branch of __base_bash_libs_cli_apply_positionals__ reads default but never applies it. These attributes are advertised together in lib/bash/cli/README.md.

Scope and acceptance criteria

  • Apply the declared default when no repeatable values are supplied, with the same enum/validator behavior as other defaults.
  • Specify and test the interaction between required, repeatable, defaults, preceding positionals, and explicit empty values.
  • Keep table declarations and direct declarations equivalent.

Validation

Reproduce the no-argument invocation above, exercise explicit and invalid defaults, and run CLI BATS/full validation.

Non-goals

No unrelated API expansion or automatic release publication. Preserve immutable published assets and unrelated consumer files.

Project fields

  • Status: Ready
  • Priority: P2
  • Area: CLI
  • Initiative: Adoption Polish
  • Size: S
  • Milestone: v2.2.0
  • Target date: unset; no delivery date has been committed.
  • Type: Bug

Agent assignment

Assignee: codeforester. This is review/backlog intake; implementation has not started.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions