Skip to content

docs(openclaw): compound commands are rewritten per segment, not skipped - #4903

Merged
KuSh merged 2 commits into
rtk-ai:developfrom
lechakrawarthy:docs/openclaw-compound-commands
Nov 8, 2026
Merged

KuSh merged 2 commits into
rtk-ai:developfrom
lechakrawarthy:docs/openclaw-compound-commands

Conversation

@lechakrawarthy

Copy link
Copy Markdown
Contributor

Summary

  • openclaw/README.md listed "Piped commands (|, &&, ;)" under "What's NOT rewritten". The plugin hands the whole command to rtk rewrite, which splits compound commands and rewrites each segment, so that bullet was wrong.
  • Replaced it with what actually stays raw (intermediate pipeline stages and |& pipelines), added a one-line example, and linked the "Compound splitting" section of src/discover/README.md. The link is absolute because this README ships in the npm package.

Closes #4900

Test plan

Docs-only change, no code touched, so I did not run cargo test.

  • Checked the new wording against the existing rewrite tests in src/discover/registry.rs: test_rewrite_pipe_then_and (git log | head -5 && git stash → rtk git log | head -5 && rtk git stash) and the git status && cargo test | grep FAIL case, where the middle cargo test stage stays raw.
  • Matched it against "Compound splitting" in src/discover/README.md.

The "What's NOT rewritten" list said piped and chained commands (|, &&, ;)
are left alone. rtk rewrite splits them and rewrites each segment; only
intermediate pipeline stages and |& pipelines stay raw.

Closes rtk-ai#4900
@CLAassistant

CLAassistant commented Nov 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added documentation Improvements or additions to documentation openclaw labels Nov 1, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

📝 Type docs
🟢 Risk low

Summary

Fixes an inaccurate bullet in openclaw/README.md that claimed piped/compound commands (|, &&, ;) are skipped by rtk rewrite, when in fact each segment is split and rewritten individually. Replaces it with the actual unrewritten cases (intermediate pipeline stages and |& pipelines) and links the discover README's compound splitting section.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4900


Analyzed automatically by wshm · This is an automated analysis, not a human review.

The plugin adds no guards of its own; what gets rewritten and what stays
raw are decided by rtk rewrite. Merge the two sections into one that
links the command list and the rewrite rules, instead of keeping a copy
of the rules here, which went out of date when the pipeline rules
changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@KuSh KuSh left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Round 1 of 3 — APPROVED (after fixup)

Claim: openclaw/README.md stops listing |, &&, ; commands as never rewritten, and lists what rtk rewrite really leaves raw.
Scope: accept (round 1, frozen); maintainer PRs: checked against #5038 (KuSh), which touches the same line; it will be rebased after this one lands.
Ran: rtk rewrite on a develop build, 34 commands by hand plus 99 by a separate check (compounds, producers with and without a filter, cat/head/tail including follow forms, grep/rg flags, middle stages, redirects, |&); every claim in the section checked against the output and against "Compound splitting" in src/discover/README.md.
Pins: 0 decisions (docs only).
Matrix: executed this round; pin check: n/a (no code).
CI @decdc3a0: all green

Blocks merge (0)

Optional — will not hold merge

The new paragraph said rtk rewrite rewrites every | segment, which is not what develop does: git log | grep fix → git log | rtk grep fix (producer stays raw), and git log | wc -l, git log | less, docker ps | head are not rewritten at all. Since the plugin has no guards of its own, I pushed a fixup that merges the two sections into one: a link to the command list and a link to "How command rewriting works" in src/discover/README.md, so this README cannot drift from the rewrite rules again.

Checked and correct — no need to re-verify

  • Removing "Piped commands (|, &&, ;)": git status && cargo test → rtk git status && rtk cargo test; || and ; likewise.
  • Commands already using rtk, heredocs, and commands without a filter are left as they are.

Next

Fixup decdc3a pushed: one section linking the command list and the rewrite rules instead of listing them. CI green on it — approving.
Rounds: 1/3. Threads: 0 open.

@KuSh
KuSh merged commit 08a261a into rtk-ai:develop Nov 8, 2026
16 checks passed
@rtk-release-bot rtk-release-bot Bot mentioned this pull request Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation openclaw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(openclaw): "What's NOT rewritten" says |, && and ; commands are left alone; rtk rewrite rewrites them

3 participants