Commit 428fa20
committed
feat(builtins): implement jq setpath, leaf_paths, fix match/scan
Prepend custom jq definitions to every filter to patch jaq limitations:
- setpath(p; v): recursive path-setting, not in jaq stdlib
- leaf_paths: paths to scalar leaves via paths(scalars)
- match: adds "name":null to unnamed captures (jaq omitted it)
- scan: uses "g" flag for global matching (jq default behavior)
The // alternative operator on null remains skipped (jaq core limitation).
Enable 4 previously-skipped spec tests. Skip count: 18 -> 14.
Closes #328
https://claude.ai/code/session_01QbjrsMFJbHy5XfHCzA6TjM1 parent 72768ec commit 428fa20
File tree
3 files changed
+50
-15
lines changed- crates/bashkit
- src/builtins
- tests
- spec_cases/jq
3 files changed
+50
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
25 | 51 | | |
26 | 52 | | |
27 | 53 | | |
| |||
297 | 323 | | |
298 | 324 | | |
299 | 325 | | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
300 | 331 | | |
301 | 332 | | |
302 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
519 | 522 | | |
520 | 523 | | |
521 | 524 | | |
| |||
577 | 580 | | |
578 | 581 | | |
579 | 582 | | |
580 | | - | |
| 583 | + | |
581 | 584 | | |
582 | 585 | | |
583 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
584 | 592 | | |
585 | 593 | | |
586 | 594 | | |
| |||
758 | 766 | | |
759 | 767 | | |
760 | 768 | | |
761 | | - | |
762 | | - | |
| 769 | + | |
| 770 | + | |
763 | 771 | | |
764 | | - | |
| 772 | + | |
765 | 773 | | |
766 | 774 | | |
767 | 775 | | |
768 | | - | |
769 | | - | |
| 776 | + | |
| 777 | + | |
770 | 778 | | |
771 | 779 | | |
772 | 780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| |||
0 commit comments