Skip to content

fix(completion): hide internal commands and suppress fish debug logs#21

Open
jeet-dekivadia wants to merge 2 commits into
openai:mainfrom
jeet-dekivadia:codex/hide-internal-shell-completions
Open

fix(completion): hide internal commands and suppress fish debug logs#21
jeet-dekivadia wants to merge 2 commits into
openai:mainfrom
jeet-dekivadia:codex/hide-internal-shell-completions

Conversation

@jeet-dekivadia

@jeet-dekivadia jeet-dekivadia commented May 30, 2026

Copy link
Copy Markdown

Summary

  • filter hidden commands from shell completion when no argument has been typed yet
  • discard stderr from fish's internal completion probe instead of appending it to /tmp/fish-debug.log
  • add focused regressions for the empty-input filter and embedded fish script

Why

The non-empty completion path already skips child.Hidden, but the initial empty-input branch did not. An initial tab press could therefore expose internal commands such as __complete, @completion, and @manpages.

The fish completion script also appended diagnostics from every tab-completion invocation to a fixed temporary file. Bash already suppresses the same internal probe's stderr. Applying the same behavior in fish avoids an unbounded cross-session debug log during normal CLI use.

Validation

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

Remote Linux validation

  • git diff --check
  • ./scripts/bootstrap
  • ./scripts/lint
  • ./scripts/test

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:24
Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
@jeet-dekivadia jeet-dekivadia changed the title fix(completion): hide internal commands on initial tab fix(completion): hide internal commands and suppress fish debug logs May 30, 2026
@jeet-dekivadia

Copy link
Copy Markdown
Author

Small follow-up for review context. This patch is limited to completion behavior: hidden commands stay hidden at the shell-completion boundary, and the fish probe no longer writes debug noise to /tmp/fish-debug.log. The regressions cover both the hidden-command filtering and the fish script stderr behavior without touching command execution itself.

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