Skip to content

docs(cli): explain opt-in Bash completion setup - #5533

Closed
ShuaixinHuang wants to merge 2 commits into
morluto:mainfrom
ShuaixinHuang:codex/docs-shell-completion-setup
Closed

ShuaixinHuang wants to merge 2 commits into
morluto:mainfrom
ShuaixinHuang:codex/docs-shell-completion-setup

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The CLI guide does not explain how to enable or remove the shell completion already exposed by rea completions --help. Add a short, opt-in Bash example, persistence/removal instructions, and the current nosort compatibility limitation.

Related: #5481 (documentation portion only; this does not claim to implement its full acceptance criteria). #5527 reports the system Bash 3.2 limitation recorded here.

Change and scope

One file, 19 added lines. Documentation only; no runtime, dependency, generated metadata or provider changes. No separate capability scope decision is applicable. Completion remains a discovery aid; help is the reference for valid options and subcommands.

Expected effects:

  • Documentation or usability only; no target interaction.

Validation performed

Windows x64, pinned Node 24.18.0/npm 11.16.0, base c374c2fe7290b914d73d9e27af38b498753ec593:

  • npm run docs:check — six tasks and all five README consistency tests passed.
  • npm exec -- oxfmt --check docs/cli.md and git diff --check — passed.
  • Actual compiled public CLI: node scripts/rea.mjs completions --help and completions bash succeeded.
  • Git Bash 5.3.15: executed the documented eval "$(rea completions bash)" using a shell function bound to this checkout; complete -p rea showed registration; a generated-hook callback for ana returned analyze, analyze-web-bundle, and analyze-javascript-application; complete -r rea removed registration.
  • Push hook: npm run check:fast — typecheck and lint both passed.
  • No shell startup file was edited. macOS Bash 3.2 was not rerun here; that limitation is supported by [Bug] Bash completion fails to register in macOS system Bash #5527 and the locked generator's unconditional -o nosort. Other shells and completion contexts were not exercised. No real analysis provider was needed or tested.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Maintainer blocker verification

The guide now distinguishes interactive non-login Bash (.bashrc) from login Bash, which reads the first existing .bash_profile, .bash_login, or .profile. Users are told to add completion to the file actually read or source .bashrc there; removal guidance remains.

On Node 24.18.0/npm 11.16.0, npm run docs:check passed (6 tasks, 5 README consistency tests), as did Oxfmt and git diff --check; the push check:fast passed. This pass did not run shell startup integration. The source diff now includes the login-shell correction; the old one-file/19-line size description predates that correction.

Replacement

Closed at the author's request and resubmitted as #6250: #6250. The replacement preserves this PR's final documentation patch and login-shell correction.

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review October 20, 2026 14:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-10-20T14:15:29.305622Z 18d52c9 Draft marked ready
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation changes appear safe to merge.

Summary

Updates docs/cli.md with opt-in Bash completion setup and removal instructions.

  • The CLI guide shows Bash users how to turn completion on and off.

Reviews (2) · Last reviewed commit: "docs(cli): explain Bash startup file beh..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18d52c9a9f

ℹ️ 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".

Comment thread docs/cli.md Resolved
@morluto morluto added area: cli CLI adapter and one-shot commands documentation Improvements or additions to documentation labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants