Skip to content

fix(completion): hide internal commands on initial tab#57

Closed
jeet-dekivadia wants to merge 1 commit into
anthropics:mainfrom
jeet-dekivadia:codex/hide-internal-shell-completions
Closed

fix(completion): hide internal commands on initial tab#57
jeet-dekivadia wants to merge 1 commit into
anthropics:mainfrom
jeet-dekivadia:codex/hide-internal-shell-completions

Conversation

@jeet-dekivadia

Copy link
Copy Markdown

Summary

  • filter hidden commands from shell completion when no argument has been typed yet
  • extend the existing empty-argument regression test with a hidden command

Why

The non-empty completion path already skips child.Hidden, but the initial empty-input branch did not. As a result, the first tab completion could expose internal commands such as __complete, @completion, and @manpages. Applying the same visibility rule in both branches keeps shell completion aligned with the CLI's public surface.

Validation

  • git diff --check
  • go test ./internal/autocomplete -count=1

Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
@jeet-dekivadia jeet-dekivadia requested a review from a team as a code owner May 30, 2026 10:20
@jeet-dekivadia

Copy link
Copy Markdown
Author

Closing to avoid overlapping review surface while #55 is already refactoring the completion command path.

@jeet-dekivadia jeet-dekivadia deleted the codex/hide-internal-shell-completions branch May 30, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant