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

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.

@markstuart-oai

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T01:30:06.247020Z d23a9b6 Manual request
🔒 Security Review Completed 2026-09-06T01:31:21.465844Z d23a9b6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: d23a9b6599

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: d23a9b6599

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@saioai saioai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve the conflicts against main and keep the remaining hidden-command fix. the fish logging change already shipped, so please preserve the newer completion code and tests.

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.

3 participants