Skip to content

Fix shell completion command coverage for hooks, workspace, and config subcommands #4347

Description

@Widthdom

Summary

The generated zsh completion script appears to be behind the top-level CLI command list. cdidx --help advertises hooks, workspace, and config show, but cdidx completions zsh did not include those top-level command candidates in the generated commands=(...) list I inspected during dogfood testing.

Evidence

Runtime probes:

  • cdidx --help listed hooks, workspace, config show, and other top-level commands.
  • cdidx completions zsh generated a large completion script for version 1.36.3.
  • The top-level zsh commands=(...) section included many commands such as index, search, recipes, audit, status, validate-config, validate, deps, impact, unused, hotspots, suggestions, languages, batch, mcp, completions, db, vacuum, report, license, and upgrade.
  • The same top-level section appeared to omit hooks, workspace, and the config show command surface.

Why It Matters

Shell completion is a user-facing command contract. If generated completions omit supported commands, users and agent workflows can miss available functionality or assume commands are unsupported.

Acceptance Sketch

  • Regenerate/adjust completion metadata so all top-level commands from cdidx --help are represented.
  • Add tests comparing completion command coverage against the canonical command registry/help list.
  • Include nested subcommands where the shell format supports them, especially config show, db schema, db prune, workspace list/status/use/current, and hooks install/uninstall/status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationtests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions