Skip to content

fix(completions): suggest --zone after a DNS records subcommand #691

Open

Description

@coygeek

Summary of the issue

Shell completion drops the global --zone selector once the cursor is after cf dns records list. The root completion can suggest the flag, the subcommand accepts it, and the same completion request after the subcommand still suggests its command-specific flags.

Expected behaviour

The second command includes --zone among the candidates because cf dns records list accepts it. The root still offers --zone, and the leaf still offers its existing --name candidates.

Version of cf used

1.0.0-rc.1

System information and package versions

Node.js 26.13.1, npm 12.2.2, macOS 27.2 (arm64).

Reproduction (optional)

Run these commands with the cf version listed above. They call the CLI completion callback directly and need no installed shell completion script or Cloudflare credentials.

cf complete -- --zo
cf complete -- dns records list --zo
cf complete -- dns records list --na
cf dns records list --help

Relevant error logs (optional)

All four commands exited zero. The root completion printed --zone with its description followed by :4. Completion after dns records list printed only :4 for --zo. The --na control printed --name, --name-exact and other name filters. Help printed -z, --zone for the leaf.

Evidence

  • Expected source: Release candidate changelog, Scripts and agents says shell completions list the flags a command accepts. Command help shows that this flag is accepted at the tested leaf.
  • Failure source: The direct completion callback transcript above. The completion registration on current main registers global flags at the root and command options on each leaf. The published release and the CI package for the linked main commit reproduced the omission.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

Restoration check

cf complete -- dns records list --zo prints a --zone candidate. The root and leaf option controls continue to return their present candidates.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: Users relying on tab completion to select the target DNS zone after the subcommand receive no matching flag. The flag still works when typed in full.
  • Workaround status: available
  • Workaround basis: cf dns records list --help documents --zone, which can be entered without completion.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions