Repository navigation
fix: bug(rewrite): hook rewrites left-hand side of piped com... - #2229
gittihub-jpg wants to merge 1 commit into
Conversation
…-ai#1560) Fixes rtk-ai#1560 Signed-off-by: gittihub-jpg <rico@springer-mail.net>
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
Thanks for digging into this. Issue #1560 was fixed on develop by #3128 (merged as ca41893), which stops the rewriter from touching any stage that feeds a pipe and rewrites the final stage only when its filter is safe to read from stdin. I ran the examples from this PR against the current develop binary: |
Closes #1560
Summary
rtk rewritefrom rewriting only the left-hand side of piped commands or subshells.src/hooks/rewrite_cmd.rsto skip rewriting when|or$()is present.grep,tail, andhead.Test plan
cargo fmt --all && cargo clippy --all-targets && cargo testrtk rewrite 'ps aux | grep python | grep -v grep'output inspected