Commit ba6feef
fix(interpreter): forward pipeline stdin to user-defined functions (#294)
## Summary
- Set `self.pipeline_stdin` before executing function body, restore
after
- Same pattern already used for compound commands in pipelines (line
~2583)
## Test plan
- [x] `issue_274_pipeline_stdin_to_function` — `echo hello | to_upper`
works
- [x] `issue_274_pipeline_stdin_to_sourced_function` — sourced function
receives stdin
Closes #274
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2e06425 commit ba6feef
2 files changed
+38
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3087 | 3087 | | |
3088 | 3088 | | |
3089 | 3089 | | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
3090 | 3094 | | |
3091 | 3095 | | |
3092 | 3096 | | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
3093 | 3100 | | |
3094 | 3101 | | |
3095 | 3102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments