Commit 0af10d7
fix(shell): expand command subs in nested contexts and assignments
- Fix expand_command_substitution to use expand_with_command_sub for args (supports nested command subs)
- Fix Assignment to use expand_with_command_sub (supports VAR=$(cmd))
- Fix Export to use expand_with_command_sub (supports export VAR=$(cmd))
Now working correctly:
- Nested command subs: echo $(outer $(inner)) → "outer inner"
- Variable assignment: VAR=$(pwd); echo $VAR → correct path
- Export with command sub: export PATH=$(pwd):$PATH
All 128 tests still passing.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 0bd6ed4 commit 0af10d7
4 files changed
Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
| 352 | + | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
| 362 | + | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | | - | |
1150 | | - | |
| 1149 | + | |
| 1150 | + | |
1151 | 1151 | | |
1152 | | - | |
| 1152 | + | |
1153 | 1153 | | |
| 1154 | + | |
1154 | 1155 | | |
1155 | 1156 | | |
1156 | 1157 | | |
| |||
Binary file not shown.
0 commit comments