[PR #5533] [CLOSED] docs(cli): explain opt-in Bash completion setup #6952

Closed
opened 2026-11-01 21:44:17 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5533
Author: @ShuaixinHuang
Created: 10/20/2026
Status: ❌ Closed

Base: main ← Head: codex/docs-shell-completion-setup


📝 Commits (2)

  • 18d52c9 docs(cli): explain opt-in Bash completion setup
  • 4263f42 docs(cli): explain Bash startup file behavior

📊 Changes

1 file changed (+23 additions, -0 deletions)

View changed files

📝 docs/cli.md (+23 -0)

📄 Description

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 #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: https://github.com/morluto/rea/pull/6250. The replacement preserves this PR's final documentation patch and login-shell correction.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5533 **Author:** [@ShuaixinHuang](https://github.com/ShuaixinHuang) **Created:** 10/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/docs-shell-completion-setup` --- ### 📝 Commits (2) - [`18d52c9`](https://github.com/morluto/rea/commit/18d52c9a9f6e45f9ee36d0ffc9174d72b71b66f2) docs(cli): explain opt-in Bash completion setup - [`4263f42`](https://github.com/morluto/rea/commit/4263f42b2c2be9240f6f1e6a8abaa77a9c8af8e0) docs(cli): explain Bash startup file behavior ### 📊 Changes **1 file changed** (+23 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/cli.md` (+23 -0) </details> ### 📄 Description ## 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: - [x] 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 #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 - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. <!-- maintainer-blocker-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: https://github.com/morluto/rea/pull/6250. The replacement preserves this PR's final documentation patch and login-shell correction. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:44:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6952
No description provided.