Skip to content

cli: build completion flag lists one flag per line so PRs adding flags stop conflicting #2116

Closed

Description

@nc9

apps/cli/src/self/completion.ts writes the bash audit flag list as one long line (about 70 flags). Every PR that adds an audit flag edits that line, so any two such PRs conflict with each other. On 2026-11-18 alone this forced hand rebases of pub#1942 (--content-store against --wcag-level), pub#2024 and pub#2058 (--urls-file), and one of those resolutions dropped the return 0 after the list (see #2112).

Acceptance Criteria

  • The bash (and zsh and fish) flag lists for audit are built from one flag per line, or generated from the command's own argument definition, so adding a flag touches only its own line.
  • Two PRs that each add a different audit flag merge in either order without a conflict in completion.ts.
  • The generated completion script is byte-for-byte unchanged by this refactor (a test compares it against the current output).
  • Related: cli: test that every bash completion case returns and that 'squirrel audit --' offers flags #2112 (a test that every bash case branch returns, and that squirrel audit -- offers flags).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions