Skip to content

docs(openclaw): compound commands are rewritten, not skipped - #5008

Closed
LetMeSleep8h wants to merge 1 commit into
rtk-ai:developfrom
LetMeSleep8h:docs/openclaw-not-rewritten
Closed

LetMeSleep8h wants to merge 1 commit into
rtk-ai:developfrom
LetMeSleep8h:docs/openclaw-not-rewritten

Conversation

@LetMeSleep8h

Copy link
Copy Markdown

Closes #4900

The README listed "Piped commands (|, &&, ;)") under "What's NOT rewritten", but the plugin passes the whole command to rtk rewrite (openclaw/index.ts), and rewrite splits compounds segment by segment:

git status && cargo test  =>  rtk git status && rtk cargo test
git log | head -5         =>  rtk git log | head -5
git status; ls            =>  rtk git status; rtk ls

The bullet is replaced with what the guards actually leave alone (heredocs, command substitution, shell keywords — see "Compound splitting" in src/discover/README.md), plus a note that compounds are rewritten. The 4903 PR covers the same fix; this one is rebased on current develop.

The README listed piped commands under 'What's NOT rewritten', but the plugin
passes the whole command to rtk rewrite, which splits compounds segment by
segment: 'git status && cargo test' becomes 'rtk git status && rtk cargo
test'. Replace the wrong bullet with what the guards actually leave alone
(heredocs, command substitution, shell keywords — see src/discover/README.md's
Compound splitting) and note that compounds are rewritten.

Closes rtk-ai#4900
@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added documentation Improvements or additions to documentation openclaw labels Nov 4, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

📝 Type docs
🟢 Risk low

Summary

Fixes the openclaw README, which incorrectly listed piped/compound commands (|, &&, ;) as 'NOT rewritten.' In fact, rtk rewrite splits and rewrites each segment of a compound command; the bullet is replaced with the actual unrewritten cases (heredocs, command substitution, shell keywords) plus an explanatory note pointing to the 'Compound splitting' docs.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4900


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

@KuSh

KuSh commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the fix. #4903 was opened first for the same issue (#4900), so I'm closing this one as a duplicate and continuing there. On that PR the section now links to the rewrite documentation in src/discover/README.md instead of listing the rules, so the two cannot drift apart again.

@KuSh KuSh closed this 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 needs-cla 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

2 participants