just-lsp 0.4.4

A language server for just
Documentation
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
use super::*;

pub const BUILTINS: &[Builtin<'_>] = &[
  Builtin::Attribute {
    name: "android",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on Android.

      Part of the platform-gating family of attributes
      (`[android]`, `[linux]`, `[macos]`, `[unix]`, `[windows]`, and
      the BSDs). When any platform attribute is present, the recipe is
      only enabled when one of the active platforms matches.

      ```just
      [android]
      install:
        adb install app.apk
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "arg",
    kind: AttributeKind::UnaryPlus,
    description: indoc! {
      "
      Configure a recipe parameter.

      Accepts a parameter name followed by one or more keyword
      arguments that customize how the parameter is surfaced on the
      command line:

      - `help=\"HELP\"` sets the usage-message help string.
      - `long=\"LONG\"` requires the value to be passed with `--LONG`.
      - `short=\"S\"` requires the value to be passed with `-S`.
      - `value=\"VALUE\"` makes the option a flag that substitutes
        `VALUE` when present. Combine with `long` and/or `short`.
      - `pattern=\"PATTERN\"` requires the value to match a regular
        expression. Patterns are full-match; `just` rejects the
        invocation if the supplied value does not match.

      Multiple keys may be combined in a single `[arg(...)]`.

      ```just
      [arg(NAME, long=\"name\", short=\"n\", help=\"greeting target\")]
      greet NAME:
        @echo Hello, {{NAME}}
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "confirm",
    kind: AttributeKind::Optional,
    description: indoc! {
      "
      Require confirmation in the terminal prior to executing the recipe.

      With no argument, uses the default prompt. Pass a single string
      to override with a custom prompt.

      Can be overridden by passing `--yes` to `just`, which
      auto-confirms any recipe marked with this attribute.

      Recipes that depend on a recipe requiring confirmation will not
      run if the confirmation is denied. Recipes listed on the command
      line after a confirmation-required recipe are also skipped if
      the confirmation is denied.

      ```just
      [confirm]
      delete-all:
        rm -rf *

      [confirm(\"Are you sure you want to delete everything?\")]
      delete-everything:
        rm -rf *
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "default",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Use this recipe as the module's default recipe.

      Running `just` with no recipe name in a module that contains a
      `[default]`-marked recipe will run that recipe, overriding the
      usual behavior of running the first recipe defined.

      ```just
      [default]
      build:
        cargo build
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "doc",
    kind: AttributeKind::Optional,
    description: indoc! {
      "
      Set or suppress the recipe's or module's documentation comment.

      With no argument, any `#`-prefixed comment immediately above the
      recipe or `mod` statement is omitted from `just --list` and
      other doc surfaces. With a string argument, that string is used
      as the documentation instead of any comment above.

      ```just
      # This comment will not appear in --list output.
      [doc]
      internal:
        @echo internal

      [doc(\"Build the project in release mode\")]
      build:
        cargo build --release
      ```
      "
    },
    targets: &[AttributeTarget::Module, AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "dragonfly",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on DragonFly BSD.

      Part of the platform-gating family of attributes
      (`[android]`, `[linux]`, `[macos]`, `[unix]`, `[windows]`,
      `[freebsd]`, `[openbsd]`, `[netbsd]`, `[dragonfly]`). When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches.

      ```just
      [dragonfly]
      install:
        pkg install myapp
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "env",
    kind: AttributeKind::Binary,
    description: indoc! {
      "
      Set environment variable `ENV_VAR` to `VALUE` for the recipe.

      The variable is exported to the recipe's shell and to any commands
      run from backticks within it. Does not affect variables outside
      the recipe.

      ```just
      [env(\"RUST_LOG\", \"debug\")]
      test:
        cargo test
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "exit-message",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Print an error message if the recipe fails.

      The inverse of `[no-exit-message]`: forces `just` to emit its
      standard failure message even if `set no-exit-message` is active
      globally.
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "extension",
    kind: AttributeKind::Unary,
    description: indoc! {
      "
      Set the file extension used when writing a shebang recipe's script
      to a temporary file.

      `EXT` should include the leading period if one is desired (for
      example `\".py\"`). This affects only how the temp file is named,
      which can matter for interpreters that dispatch on extension.

      ```just
      [extension(\".py\")]
      hello:
        #!/usr/bin/env python3
        print(\"hello\")
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "freebsd",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on FreeBSD.

      Part of the platform-gating family of attributes. When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches.

      ```just
      [freebsd]
      install:
        pkg install myapp
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "group",
    kind: AttributeKind::Unary,
    description: indoc! {
      "
      Place the recipe or module in the named group `NAME`.

      Groups are used by `just --list` to visually cluster related
      recipes. `[group(...)]` may be repeated on the same recipe or
      module to place it in multiple groups.

      ```just
      [group(\"build\")]
      compile:
        cargo build

      [group(\"build\")]
      [group(\"release\")]
      package:
        cargo build --release
      ```
      "
    },
    targets: &[AttributeTarget::Module, AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "linux",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on Linux.

      Part of the platform-gating family of attributes
      (`[android]`, `[linux]`, `[macos]`, `[unix]`, `[windows]`, and
      the BSDs). When any platform attribute is present, the recipe is
      only enabled when one of the active platforms matches. Useful for writing
      cross-platform justfiles that dispatch on the host OS.

      ```just
      [linux]
      run:
        cc main.c && ./a.out

      [windows]
      run:
        cl main.c && main.exe
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "macos",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on macOS.

      Part of the platform-gating family of attributes. When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches.

      Note that `[unix]` also enables the recipe on macOS.

      ```just
      [macos]
      open target:
        open {{target}}
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "metadata",
    kind: AttributeKind::UnaryPlus,
    description: indoc! {
      "
      Attach arbitrary metadata `METADATA` to the recipe.

      The attribute accepts any number of arguments. `just` does not
      interpret them; they are surfaced via `just --dump --dump-format
      json` and intended for consumption by external tooling.

      ```just
      [metadata(\"key1=value1\", \"key2=value2\")]
      build:
        cargo build
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "netbsd",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on NetBSD.

      Part of the platform-gating family of attributes. When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches.
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "no-cd",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Don't change directory before executing the recipe.

      Normally `just` runs recipes with the current directory set to
      the directory containing the `justfile`. With `[no-cd]`, the
      recipe runs with the current directory unchanged, so it can use
      paths relative to the invocation directory or operate on the
      user's current directory.

      ```just
      [no-cd]
      commit file:
        git add {{file}}
        git commit
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "no-exit-message",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Don't print an error message if the recipe fails.

      `just` normally prints a line like `error: Recipe \\\"foo\\\" failed
      with exit code 1` when a recipe exits non-zero. This attribute
      suppresses that message for the annotated recipe, which is useful
      when the recipe already prints its own, more specific error
      output.

      ```just
      [no-exit-message]
      test:
        ./run-tests.sh
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "no-quiet",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Override globally quiet recipes and always echo the recipe lines.

      Cancels the effect of `set quiet := true` or a leading `@` on the
      recipe itself. Useful when the global default is to suppress echo
      but you want this particular recipe to be visible.

      ```just
      set quiet := true

      [no-quiet]
      build:
        cargo build
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "openbsd",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on OpenBSD.

      Part of the platform-gating family of attributes. When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches.
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "parallel",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Run this recipe's dependencies in parallel.

      By default, a recipe's dependencies are executed serially in the
      order they appear. `[parallel]` fans them out so they run
      concurrently. The recipe body itself runs only after all
      dependencies complete.

      ```just
      [parallel]
      check: check-formatting check-lints check-tests
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "positional-arguments",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Turn on positional arguments for this recipe.

      Recipe arguments are passed to the shell as positional parameters
      (`$0`, `$1`, `$@`, ...) instead of being interpolated as
      `{{ name }}`. The recipe name is available as `$0` for linewise
      recipes.

      Note that PowerShell does not handle positional arguments the
      same way as POSIX shells; enabling this with PowerShell as the
      configured shell will likely break the recipe.

      ```just
      [positional-arguments]
      @foo bar:
        echo $0
        echo $1
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "private",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Make a recipe, alias, variable, or module private.

      Private items are hidden from `just --list` and `just
      --summary`, but are still callable by name and usable as
      dependencies of other recipes. A leading underscore on the name
      has the same effect.

      ```just
      [private]
      _helper:
        @echo internal
      ```
      "
    },
    targets: &[
      AttributeTarget::Alias,
      AttributeTarget::Assignment,
      AttributeTarget::Module,
      AttributeTarget::Recipe,
    ],
  },
  Builtin::Attribute {
    name: "script",
    kind: AttributeKind::Variadic,
    description: indoc! {
      "
      Execute the recipe as a script.

      With no argument, uses the interpreter configured by
      `set script-interpreter := [...]` (default: `['sh', '-eu']`).
      With an argument, uses the supplied `COMMAND` as the
      interpreter, bypassing the `script-interpreter` setting.

      Instead of running each line separately through the shell, the
      entire recipe body is written to a temporary file and passed to
      the interpreter as a single script. This makes multi-line
      control flow, here-docs, and shell-specific features work as
      written.

      ```just
      set script-interpreter := ['bash', '-eu']

      [script]
      hello:
        for i in 1 2 3; do
          echo $i
        done

      [script(\"python3\")]
      hello-py:
        print(\"hello from python\")
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "unix",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on Unix-like platforms, including macOS.

      Part of the platform-gating family of attributes. When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches. `[unix]` matches Android,
      Linux, macOS, and the BSDs.

      ```just
      [unix]
      run:
        cc main.c && ./a.out
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "windows",
    kind: AttributeKind::Nullary,
    description: indoc! {
      "
      Enable the recipe on Windows.

      Part of the platform-gating family of attributes. When any
      platform attribute is present, the recipe is only enabled when
      one of the active platforms matches.

      ```just
      [windows]
      run:
        cl main.c && main.exe
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Attribute {
    name: "working-directory",
    kind: AttributeKind::Unary,
    description: indoc! {
      "
      Set the recipe's working directory to `PATH`.

      `PATH` may be relative or absolute. If relative, it is
      interpreted relative to the default working directory (the
      directory containing the `justfile`, unless overridden).

      ```just
      [working-directory(\"./subproject\")]
      build:
        cargo build
      ```
      "
    },
    targets: &[AttributeTarget::Recipe],
  },
  Builtin::Constant {
    name: "BG_BLACK",
    description: indoc! {
      "
      ANSI escape sequence for black background: `\\e[40m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_BLUE",
    description: indoc! {
      "
      ANSI escape sequence for blue background: `\\e[44m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_CYAN",
    description: indoc! {
      "
      ANSI escape sequence for cyan background: `\\e[46m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_GREEN",
    description: indoc! {
      "
      ANSI escape sequence for green background: `\\e[42m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_MAGENTA",
    description: indoc! {
      "
      ANSI escape sequence for magenta background: `\\e[45m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_RED",
    description: indoc! {
      "
      ANSI escape sequence for red background: `\\e[41m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_WHITE",
    description: indoc! {
      "
      ANSI escape sequence for white background: `\\e[47m`.
      "
    },
  },
  Builtin::Constant {
    name: "BG_YELLOW",
    description: indoc! {
      "
      ANSI escape sequence for yellow background: `\\e[43m`.
      "
    },
  },
  Builtin::Constant {
    name: "BLACK",
    description: indoc! {
      "
      ANSI escape sequence for black foreground text: `\\e[30m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "BLUE",
    description: indoc! {
      "
      ANSI escape sequence for blue foreground text: `\\e[34m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "BOLD",
    description: indoc! {
      "
      ANSI escape sequence for bold text: `\\e[1m`.

      Combine with color constants and terminate with `NORMAL`.
      "
    },
  },
  Builtin::Constant {
    name: "CLEAR",
    description: indoc! {
      "
      ANSI escape sequence that clears the terminal screen, similar to
      the `clear` command: `\\ec`.
      "
    },
  },
  Builtin::Constant {
    name: "CYAN",
    description: indoc! {
      "
      ANSI escape sequence for cyan foreground text: `\\e[36m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "GREEN",
    description: indoc! {
      "
      ANSI escape sequence for green foreground text: `\\e[32m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "HEX",
    description: indoc! {
      "
      Lowercase hexadecimal digit string: `\"0123456789abcdef\"`.

      Useful as the alphabet argument to `choose()` for generating
      random hex strings.

      ```just
      token := choose('32', HEX)
      ```
      "
    },
  },
  Builtin::Constant {
    name: "HEXLOWER",
    description: indoc! {
      "
      Explicitly lowercase hexadecimal digit string:
      `\"0123456789abcdef\"`.

      Identical to `HEX`. Prefer this name when paired with `HEXUPPER`
      to make the case intent obvious at the call site.
      "
    },
  },
  Builtin::Constant {
    name: "HEXUPPER",
    description: indoc! {
      "
      Uppercase hexadecimal digit string: `\"0123456789ABCDEF\"`.

      Useful as the alphabet argument to `choose()` for generating
      uppercase-hex strings.
      "
    },
  },
  Builtin::Constant {
    name: "HIDE",
    description: indoc! {
      "
      ANSI escape sequence for hidden (concealed) text: `\\e[8m`.

      Useful for sensitive output like passwords, though not a
      substitute for proper secret handling.
      "
    },
  },
  Builtin::Constant {
    name: "INVERT",
    description: indoc! {
      "
      ANSI escape sequence that swaps foreground and background colors:
      `\\e[7m`.
      "
    },
  },
  Builtin::Constant {
    name: "ITALIC",
    description: indoc! {
      "
      ANSI escape sequence for italic text: `\\e[3m`.

      Support for italic rendering varies by terminal.
      "
    },
  },
  Builtin::Constant {
    name: "MAGENTA",
    description: indoc! {
      "
      ANSI escape sequence for magenta foreground text: `\\e[35m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "NORMAL",
    description: indoc! {
      "
      ANSI escape sequence that resets all terminal display attributes:
      `\\e[0m`.

      Use at the end of a styled segment to return the terminal to its
      default colors and weights.

      ```just
      @greet:
        echo '{{BOLD}}{{RED}}danger{{NORMAL}}'
      ```
      "
    },
  },
  Builtin::Constant {
    name: "PATH_SEP",
    description: indoc! {
      "
      Native path separator: `/` on Unix, `\\` on Windows.

      Use when constructing paths that must use the host's conventional
      separator.
      "
    },
  },
  Builtin::Constant {
    name: "PATH_VAR_SEP",
    description: indoc! {
      "
      Native `PATH`-variable list separator: `:` on Unix, `;` on
      Windows.

      Use when building colon- or semicolon-delimited path lists for
      environment variables like `$PATH`.
      "
    },
  },
  Builtin::Constant {
    name: "RED",
    description: indoc! {
      "
      ANSI escape sequence for red foreground text: `\\e[31m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "STRIKETHROUGH",
    description: indoc! {
      "
      ANSI escape sequence for strikethrough text: `\\e[9m`.
      "
    },
  },
  Builtin::Constant {
    name: "UNDERLINE",
    description: indoc! {
      "
      ANSI escape sequence for underlined text: `\\e[4m`.
      "
    },
  },
  Builtin::Constant {
    name: "WHITE",
    description: indoc! {
      "
      ANSI escape sequence for white foreground text: `\\e[37m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Constant {
    name: "YELLOW",
    description: indoc! {
      "
      ANSI escape sequence for yellow foreground text: `\\e[33m`.

      Terminate styled output with `NORMAL` to reset.
      "
    },
  },
  Builtin::Function {
    name: "absolute_path",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the absolute form of `path`, resolved against the current
      working directory. Does not follow symlinks or canonicalize. For
      that, use `canonicalize()`.

      ```just
      absolute_path(\"./bar.txt\")  # in /foo -> \"/foo/bar.txt\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "append",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Append `suffix` to each whitespace-separated token in `s`.

      ```just
      append(\"/src\", \"foo bar baz\")  # => \"foo/src bar/src baz/src\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "arch",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Instruction set architecture of the host machine.

      Returns one of: `aarch64`, `arm`, `asmjs`, `hexagon`, `mips`,
      `msp430`, `powerpc`, `powerpc64`, `s390x`, `sparc`, `wasm32`,
      `x86`, `x86_64`, or `xcore`.

      ```just
      system-info:
        @echo This is an {{arch()}} machine.
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "blake3",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the BLAKE3 hash of `string` as a lowercase hex string.

      ```just
      blake3(\"hello\")  # => \"ea8f163db38682925e4491c5e58d4bb...\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "blake3_file",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the BLAKE3 hash of the file at `path` as a lowercase hex
      string. Aborts if the file cannot be read.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "cache_directory",
    aliases: &["cache_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      User-specific cache directory.

      On Unix, follows the XDG Base Directory Specification
      (`$XDG_CACHE_HOME` or `$HOME/.cache`). On macOS, returns
      `~/Library/Caches`. On Windows, returns
      `{FOLDERID_LocalAppData}`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "canonicalize",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Canonicalize `path` by resolving symlinks and removing `.`,
      `..`, and redundant path separators where possible. Aborts if
      the path does not exist.

      ```just
      canonicalize(\"../foo/./bar\")  # => \"/absolute/path/to/bar\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "capitalize",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return `s` with the first character uppercased and the rest
      lowercased.

      ```just
      capitalize(\"hello WORLD\")  # => \"Hello world\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "choose",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Return a string of `n` randomly selected characters from
      `alphabet`. `alphabet` may not contain repeated characters.

      ```just
      choose('64', HEX)  # 64-character random lowercase hex string
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "clean",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Simplify `path` by removing extra path separators, intermediate
      `.` components, and `..` where possible. Purely lexical; does not
      touch the filesystem.

      ```just
      clean(\"foo//bar/../baz\")  # => \"foo/baz\"
      clean(\"foo/./bar\")       # => \"foo/bar\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "config_directory",
    aliases: &["config_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      User-specific configuration directory.

      On Unix, follows the XDG Base Directory Specification
      (`$XDG_CONFIG_HOME` or `$HOME/.config`). On macOS, returns
      `~/Library/Application Support`. On Windows, returns
      `{FOLDERID_RoamingAppData}`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "config_local_directory",
    aliases: &["config_local_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Local user-specific configuration directory, for configuration
      that should not roam or sync between machines.

      On Unix, follows XDG conventions. On Windows, returns
      `{FOLDERID_LocalAppData}`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "data_directory",
    aliases: &["data_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      User-specific data directory.

      On Unix, follows the XDG Base Directory Specification
      (`$XDG_DATA_HOME` or `$HOME/.local/share`). On macOS, returns
      `~/Library/Application Support`. On Windows, returns
      `{FOLDERID_RoamingAppData}`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "data_local_directory",
    aliases: &["data_local_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Local user-specific data directory, for data that should not
      roam or sync between machines.

      On Unix, follows XDG conventions. On Windows, returns
      `{FOLDERID_LocalAppData}`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "datetime",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the current local time formatted with `format`.

      `format` is a `strftime`-style string. See the
      [`chrono` docs](https://docs.rs/chrono/latest/chrono/format/strftime/index.html)
      for the full set of specifiers.

      ```just
      datetime(\"%Y-%m-%d\")  # => \"2026-04-23\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "datetime_utc",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the current UTC time formatted with `format`.

      `format` is a `strftime`-style string. See the
      [`chrono` docs](https://docs.rs/chrono/latest/chrono/format/strftime/index.html)
      for the full set of specifiers.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "encode_uri_component",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Percent-encode every character in `s` except
      `[A-Za-z0-9_.!~*'()-]`. Matches the behavior of JavaScript's
      `encodeURIComponent`.

      ```just
      encode_uri_component(\"hello world!\")  # => \"hello%20world!\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "env",
    aliases: &[],
    kind: FunctionKind::UnaryOpt,
    description: indoc! {
      "
      Retrieve the environment variable named `key`.

      Called with one argument, aborts execution if the variable is
      unset. Called with two arguments, returns `default` when the
      variable is unset.

      A default can be substituted for an *empty* value (not just an
      unset one) with the `||` operator, currently unstable:

      ```just
      set unstable
      foo := env('FOO', '') || 'DEFAULT_VALUE'
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "env_var",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      **Deprecated**: use `env(key)` instead.

      Retrieve the environment variable named `key`. Aborts if the
      variable is unset.
      "
    },
    deprecated: Some("env"),
  },
  Builtin::Function {
    name: "env_var_or_default",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      **Deprecated**: use `env(key, default)` instead.

      Retrieve the environment variable named `key`, returning
      `default` when the variable is unset.
      "
    },
    deprecated: Some("env"),
  },
  Builtin::Function {
    name: "error",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Abort execution and report `message` to the user. Diverges and
      never returns a value.

      ```just
      check-flag:
        @echo {{ if flag == \"\" { error(\"flag must be set\") } else { flag } }}
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "executable_directory",
    aliases: &["executable_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      User-specific executable directory.

      On Unix, follows the XDG Base Directory Specification
      (`$XDG_BIN_HOME` or `$HOME/.local/bin`). On Windows, returns no
      well-defined value, so use with care on that platform.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "extension",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the file extension of `path`, not including the leading
      period. Aborts if `path` has no extension.

      ```just
      extension(\"/foo/bar.txt\")  # => \"txt\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "file_name",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the file name of `path` with any leading directory
      components removed.

      ```just
      file_name(\"/foo/bar.txt\")  # => \"bar.txt\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "file_stem",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the file name of `path` without its extension or any
      leading directory components.

      ```just
      file_stem(\"/foo/bar.txt\")  # => \"bar\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "home_directory",
    aliases: &["home_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      The user's home directory.

      On Unix, returns `$HOME`. On macOS, returns `$HOME`. On Windows,
      returns `{FOLDERID_Profile}`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "invocation_directory",
    aliases: &["invocation_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      The absolute path of the directory in which `just` was invoked,
      before it `chdir`'d to the justfile directory.

      On Windows, paths are converted to Cygwin-style forward-slash
      form via `cygpath`. Use `invocation_directory_native()` to keep
      the native path on all platforms.

      Useful when a recipe needs to operate on files relative to where
      the user ran `just` rather than where the justfile lives.

      ```just
      rustfmt:
        find {{invocation_directory()}} -name '*.rs' -exec rustfmt {} \\\\;
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "invocation_directory_native",
    aliases: &["invocation_dir_native"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      The absolute path of the directory in which `just` was invoked,
      in the host's native path format.

      Unlike `invocation_directory()`, this does not convert paths to
      Cygwin style on Windows.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "is_dependency",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Return the string `\"true\"` if the current recipe is being run
      as a dependency of another recipe, and `\"false\"` if it was
      invoked directly from the command line.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "join",
    aliases: &[],
    kind: FunctionKind::BinaryPlus,
    description: indoc! {
      "
      Join two or more path components.

      Uses `/` on Unix and `\\` on Windows, which can lead to surprises
      in cross-platform justfiles. Prefer the `/` operator (`a / b`),
      which always uses `/`, unless Windows backslashes are
      specifically desired.

      ```just
      join(\"foo/bar\", \"baz\")  # => \"foo/bar/baz\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "just_executable",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Absolute path to the `just` executable that is currently running.

      ```just
      executable:
        @echo just is at {{just_executable()}}
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "just_pid",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Process ID of the running `just` executable, as a decimal string.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "justfile",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Absolute path to the current `justfile`.

      In submodules and imports, still refers to the *root* justfile.
      Use `source_file()` to get the path of the file currently being
      evaluated.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "justfile_directory",
    aliases: &["justfile_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Absolute path to the parent directory of the current `justfile`.

      ```just
      script:
        {{justfile_directory()}}/scripts/deploy
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "kebabcase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `kebab-case`.

      ```just
      kebabcase(\"helloWorld\")  # => \"hello-world\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "lowercamelcase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `lowerCamelCase`.

      ```just
      lowercamelcase(\"hello_world\")  # => \"helloWorld\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "lowercase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to lowercase.

      ```just
      lowercase(\"Hello\")  # => \"hello\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "module_directory",
    aliases: &["module_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Directory of the current module file. Behaves like
      `justfile_directory()` in the root justfile, but resolves to the
      directory of the current `mod` source file inside submodules.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "module_file",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Path of the current module file. Behaves like `justfile()` in
      the root justfile, but resolves to the current `mod` source
      file inside submodules.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "module_path",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      `::`-separated path to the current module.

      In the root justfile this returns the empty string. Inside a
      submodule, it returns the module path used to address recipes in
      that module.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "num_cpus",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Number of logical CPUs available on the host machine.

      ```just
      build:
        make -j{{num_cpus()}}
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "os",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Host operating system.

      Returns one of: `android`, `bitrig`, `dragonfly`, `emscripten`,
      `freebsd`, `haiku`, `ios`, `linux`, `macos`, `netbsd`, `openbsd`,
      `solaris`, or `windows`.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "os_family",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Host operating system family. Returns `unix` or `windows`.

      Useful for gating logic in cross-platform justfiles.

      ```just
      run:
        {{if os_family() == \"windows\" { \"main.exe\" } else { \"./main\" }}}
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "parent_directory",
    aliases: &["parent_dir"],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the parent directory of `path`. Aborts if `path` has no
      parent (e.g. the filesystem root).

      ```just
      parent_directory(\"/foo/bar.txt\")  # => \"/foo\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "path_exists",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return `\"true\"` if `path` points at an existing filesystem
      entity, `\"false\"` otherwise.

      Symbolic links are traversed. Returns `\"false\"` for broken
      symlinks or when the path is inaccessible.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "prepend",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Prepend `prefix` to each whitespace-separated token in `s`.

      ```just
      prepend(\"src/\", \"foo bar baz\")  # => \"src/foo src/bar src/baz\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "quote",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Quote `s` for safe use as a single argument in a POSIX shell.

      Replaces every single quote with `'\\''` and surrounds the
      result in single quotes. Sufficient for `sh` and most
      descendants (`bash`, `zsh`, `dash`, ...).

      ```just
      quote(\"hello 'world'\")  # => \"'hello '\\\\''world'\\\\'''\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "read",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the contents of the file at `path` as a string. Aborts if
      the file cannot be read.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "replace",
    aliases: &[],
    kind: FunctionKind::Ternary,
    description: indoc! {
      "
      Replace every occurrence of `from` in `s` with `to`.

      ```just
      replace(\"hello\", \"l\", \"x\")  # => \"hexxo\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "replace_regex",
    aliases: &[],
    kind: FunctionKind::Ternary,
    description: indoc! {
      "
      Replace every match of `regex` in `s` with `replacement`.

      Regex syntax and replacement syntax are provided by the Rust
      [`regex`](https://docs.rs/regex) crate. Capture groups are
      supported; see the crate's
      [replacement syntax](https://docs.rs/regex/latest/regex/struct.Regex.html#replacement-string-syntax)
      docs for details.

      ```just
      replace_regex(\"hello\", \"[aeiou]\", \"X\")  # => \"hXllX\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "require",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Search the directories in `$PATH` for an executable called
      `name` and return its full path. Aborts with an error if no
      such executable is found.

      ```just
      bash := require(\"bash\")

      @test:
        echo using {{bash}}
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "runtime_directory",
    aliases: &["runtime_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      The user-specific runtime directory.

      Follows the XDG Base Directory Specification on Unix; returns
      the platform-specified runtime directory on other systems. May
      be unset on some platforms, in which case the function aborts.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "semver_matches",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Check whether a semantic version `version` satisfies a
      `requirement`, returning `\"true\"` or `\"false\"`.

      ```just
      semver_matches(\"1.2.3\", \">=1.0.0\")  # => \"true\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "sha256",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the SHA-256 hash of `string` as a lowercase hex string.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "sha256_file",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the SHA-256 hash of the file at `path` as a lowercase hex
      string. Aborts if the file cannot be read.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "shell",
    aliases: &[],
    kind: FunctionKind::UnaryPlus,
    description: indoc! {
      "
      Return the standard output of shell script `command`, with zero
      or more positional arguments `args`.

      The shell used to interpret `command` is the same shell used to
      evaluate recipe lines, configurable with `set shell := [...]`.

      `command` is also passed as the first positional argument, so
      that `$@` works as expected and `$1` refers to the first
      user-supplied argument. With the default `sh -cu` shell and args
      `'foo'` and `'bar'`, the full invocation is:

      ```
      'sh' '-cu' 'echo $@' 'echo $@' 'foo' 'bar'
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "shoutykebabcase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `SHOUTY-KEBAB-CASE`.

      ```just
      shoutykebabcase(\"hello_world\")  # => \"HELLO-WORLD\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "shoutysnakecase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `SHOUTY_SNAKE_CASE`.

      ```just
      shoutysnakecase(\"hello-world\")  # => \"HELLO_WORLD\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "snakecase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `snake_case`.

      ```just
      snakecase(\"helloWorld\")  # => \"hello_world\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "source_directory",
    aliases: &["source_dir"],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Directory of the current source file. Behaves like
      `justfile_directory()` in the root justfile, but resolves to the
      directory of the current `import` or `mod` source file when
      called from within an imported or submodule file.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "source_file",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Path of the current source file. Behaves like `justfile()` in
      the root justfile, but resolves to the current `import` or `mod`
      source file when called from within an imported or submodule
      file.
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "style",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return the terminal display attribute escape sequence used by
      `just` itself for styled output.

      Unlike the plain color constants, `style(name)` produces the
      exact sequence `just` uses, so recipe output can match
      `just`'s own styling.

      Recognized values of `name`: `'command'` (echoed recipe lines),
      `'error'`, and `'warning'`.

      ```just
      scary:
        @echo '{{ style(\"error\") }}OH NO{{ NORMAL }}'
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "titlecase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `Title Case`.

      ```just
      titlecase(\"hello world\")  # => \"Hello World\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Remove leading and trailing whitespace from `s`.

      ```just
      trim(\"  hello  \")  # => \"hello\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim_end",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Remove trailing whitespace from `s`.

      ```just
      trim_end(\"hello  \")  # => \"hello\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim_end_match",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Remove a single trailing occurrence of `substring` from `s` if
      present. Leaves `s` unchanged if `substring` does not match at
      the end.

      ```just
      trim_end_match(\"hello.txt\", \".txt\")  # => \"hello\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim_end_matches",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Repeatedly remove trailing occurrences of `substring` from `s`
      until none remain.

      ```just
      trim_end_matches(\"aaaab\", \"a\")  # => \"aaaab\"
      trim_end_matches(\"baaaa\", \"a\")  # => \"b\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim_start",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Remove leading whitespace from `s`.

      ```just
      trim_start(\"  hello\")  # => \"hello\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim_start_match",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Remove a single leading occurrence of `substring` from `s` if
      present. Leaves `s` unchanged if `substring` does not match at
      the start.

      ```just
      trim_start_match(\"hello-world\", \"hello-\")  # => \"world\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "trim_start_matches",
    aliases: &[],
    kind: FunctionKind::Binary,
    description: indoc! {
      "
      Repeatedly remove leading occurrences of `substring` from `s`
      until none remain.

      ```just
      trim_start_matches(\"aaaab\", \"a\")  # => \"b\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "uppercamelcase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to `UpperCamelCase` (also known as PascalCase).

      ```just
      uppercamelcase(\"hello_world\")  # => \"HelloWorld\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "uppercase",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Convert `s` to uppercase.

      ```just
      uppercase(\"hello\")  # => \"HELLO\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "uuid",
    aliases: &[],
    kind: FunctionKind::Nullary,
    description: indoc! {
      "
      Generate a random version 4 UUID.

      ```just
      uuid()  # => \"f81d4fae-7dec-11d0-a765-00a0c91e6bf6\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "which",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Search the directories in `$PATH` for an executable called
      `name` and return its full path, or the empty string if no such
      executable is found.

      Unlike `require()`, does not abort on missing executables, so
      this is useful for optional tooling. Currently unstable; requires
      `set unstable`.

      ```just
      set unstable

      bosh := which(\"bosh\")
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Function {
    name: "without_extension",
    aliases: &[],
    kind: FunctionKind::Unary,
    description: indoc! {
      "
      Return `path` with its extension removed. Aborts if `path` has
      no extension.

      ```just
      without_extension(\"/foo/bar.txt\")  # => \"/foo/bar\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "allow-duplicate-recipes",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Allow recipes appearing later in a `justfile` to override
      earlier recipes with the same name, instead of producing a
      duplicate-definition error.

      ```just
      set allow-duplicate-recipes

      @foo:
        echo foo

      @foo:
        echo bar
      ```

      `just foo` in the above justfile prints `bar`.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "allow-duplicate-variables",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Allow variables appearing later in a `justfile` to override
      earlier variables with the same name, instead of producing a
      duplicate-definition error.

      ```just
      set allow-duplicate-variables

      a := \"foo\"
      a := \"bar\"
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "dotenv-filename",
    kind: SettingKind::String,
    description: indoc! {
      "
      Load a `.env` file with a custom name.

      When set, `just` looks for a file with the given name relative
      to the working directory and each of its ancestors. It is not
      an error if no file is found unless `dotenv-required` is also
      set.

      ```just
      set dotenv-filename := \".env.local\"
      ```

      Compare with `dotenv-path`, which is only checked relative to
      the working directory.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "dotenv-load",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Load a `.env` file, if present.

      When enabled, `just` looks for a file named `.env` relative to
      the working directory and each of its ancestors. It is not an
      error if no file is found unless `dotenv-required` is also set.

      Loaded values become **environment variables**, not `just`
      variables, so they must be accessed as `$VARIABLE_NAME` in
      recipes and backticks.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "dotenv-override",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Override existing environment variables with values from the
      `.env` file.

      By default, variables already set in the ambient environment
      win over those loaded from `.env`. With this setting enabled,
      the dotenv values take precedence.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "dotenv-path",
    kind: SettingKind::String,
    description: indoc! {
      "
      Load a `.env` file from a specific path. Errors if the file is
      not found. Overrides `dotenv-filename`.

      Unlike `dotenv-filename`, which is searched for relative to the
      working directory and each ancestor, `dotenv-path` is checked
      only relative to the working directory (or is absolute).

      Can also be overridden at runtime via the `--dotenv-path` /
      `-E` command-line option.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "dotenv-required",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Error if a `.env` file isn't found.

      By default, dotenv-related settings silently skip loading when
      the target file does not exist. With this enabled, the absence
      of the file is a hard error.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "export",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Export every top-level `just` variable as an environment
      variable.

      Equivalent to prefixing each assignment with `export`, so
      recipes and backticks see the variables as `$NAME` rather than
      needing `{{ name }}` interpolation.

      ```just
      set export

      a := \"hello\"

      @foo b:
        echo $a
        echo $b
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "fallback",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      If the first recipe on the command line is not found in the
      current justfile, search for a justfile in the parent directory
      and try there.

      Useful in nested project layouts where a subdirectory justfile
      should transparently defer to the root one for unknown
      recipes.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "guards",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Enable `?` sigils on recipe lines to conditionally stop recipe
      execution without reporting an error.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "ignore-comments",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Ignore recipe lines beginning with `#`.

      With this enabled, comment lines inside recipe bodies are
      stripped before being passed to the shell, rather than being
      echoed and executed as comments.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "lazy",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Don't evaluate unused variables.

      Normally `just` evaluates every assignment when the justfile is
      loaded. Lazy mode defers evaluation until a variable is actually
      referenced by the recipe being run. Useful when some assignments
      involve expensive backticks or `shell()` calls that only a subset
      of recipes need.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "no-cd",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Don't change directory before executing recipes in the current
      module.

      By default, `just` executes recipes with the current directory set
      to the directory containing the justfile. This setting leaves the
      current directory unchanged for every recipe in the module.

      Individual recipes can also opt in with `[no-cd]`, and
      `[working-directory(PATH)]` can override the working directory for a
      specific recipe.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "no-exit-message",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Suppress the trailing `error: Recipe \\\"foo\\\" failed with exit
      code N` message for failed recipes, globally. Individual
      recipes can still opt back in with the `[exit-message]`
      attribute.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "positional-arguments",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Pass recipe arguments as shell positional parameters (`$0`,
      `$1`, `$@`, ...) for all recipes in the justfile.

      Equivalent to annotating every recipe with
      `[positional-arguments]`. PowerShell does not handle positional
      arguments the same way as POSIX shells, so enabling this with a
      PowerShell-configured `shell` will likely break.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "quiet",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Disable echoing recipe lines before executing them.

      Equivalent to prefixing every recipe line with `@`. Individual
      recipes can opt out with the `[no-quiet]` attribute.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "script-interpreter",
    kind: SettingKind::Array,
    description: indoc! {
      "
      Set the command used to invoke recipes annotated with a bare
      `[script]` attribute (no interpreter argument). Defaults to
      `['sh', '-eu']`.

      ```just
      set script-interpreter := ['bash', '-eu']

      [script]
      hello:
        for i in 1 2 3; do echo $i; done
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "shell",
    kind: SettingKind::Array,
    description: indoc! {
      "
      Set the command used to invoke recipe lines and evaluate
      backticks. Shebang recipes are unaffected. Defaults to `sh -cu`
      on Unix; on Windows, use `windows-shell` to override.

      `just` appends the line-to-run as an additional argument, so
      most shells need a `-c`-style flag to make them evaluate the
      first argument as a command.

      ```just
      set shell := [\"zsh\", \"-cu\"]

      foo:
        ls **/*.txt  # will run via zsh
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "tempdir",
    kind: SettingKind::String,
    description: indoc! {
      "
      Create temporary directories used by shebang and script recipes
      in `tempdir` instead of the system default (`$TMPDIR` /
      `/tmp`).

      Useful when the system temp directory is mounted `noexec` and
      cannot run the temporary script files `just` generates.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "unstable",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      Enable unstable features, such as the `||` operator for
      fallback defaults and the `which()` function.

      Unstable features may change or be removed without notice.
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "windows-powershell",
    kind: SettingKind::Boolean(false),
    description: indoc! {
      "
      **Deprecated**: use `windows-shell` instead.

      Use the legacy `powershell.exe` binary on Windows as the
      default shell for recipes and backticks. Prefer `windows-shell`
      for a more flexible, version-agnostic alternative.
      "
    },
    deprecated: Some("windows-shell"),
  },
  Builtin::Setting {
    name: "windows-shell",
    kind: SettingKind::Array,
    description: indoc! {
      "
      Set the command used to invoke recipes and evaluate backticks
      on Windows.

      By default, `just` uses `sh` on Windows. Set this to use
      PowerShell, `cmd.exe`, Nushell, or any other shell.

      ```just
      set windows-shell := [\"powershell.exe\", \"-NoLogo\", \"-Command\"]

      hello:
        Write-Host 'Hello, world!'
      ```
      "
    },
    deprecated: None,
  },
  Builtin::Setting {
    name: "working-directory",
    kind: SettingKind::String,
    description: indoc! {
      "
      Set the working directory for recipes and backticks, relative
      to the default working directory.

      If relative, interpreted relative to the directory containing
      the justfile. If absolute, used as-is.

      Individual recipes can override this with the
      `[working-directory(PATH)]` attribute or disable directory
      change entirely with `[no-cd]`.
      "
    },
    deprecated: None,
  },
];

#[cfg(test)]
mod tests {
  use super::*;

  #[test]
  fn no_duplicate_names() {
    #[track_caller]
    fn case(kind: &str, names: impl IntoIterator<Item = &'static str>) {
      let mut seen = HashSet::new();

      for name in names {
        assert!(
          seen.insert(name),
          "duplicate {kind} name in BUILTINS: {name}",
        );
      }
    }

    case(
      "attribute",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Attribute { name, .. } => Some(*name),
        _ => None,
      }),
    );

    case(
      "constant",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Constant { name, .. } => Some(*name),
        _ => None,
      }),
    );

    case(
      "function",
      BUILTINS.iter().flat_map(|builtin| match builtin {
        Builtin::Function { name, aliases, .. } => once(*name)
          .chain(aliases.iter().copied())
          .collect::<Vec<_>>(),
        _ => Vec::new(),
      }),
    );

    case(
      "setting",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Setting { name, .. } => Some(*name),
        _ => None,
      }),
    );
  }

  #[test]
  fn alphabetical_by_kind() {
    #[track_caller]
    fn case(kind: &str, names: impl IntoIterator<Item = &'static str>) {
      let names = names.into_iter().collect::<Vec<_>>();

      for window in names.windows(2) {
        assert!(
          window[0] < window[1],
          "{kind} names out of order in BUILTINS: {:?} before {:?}",
          window[0],
          window[1],
        );
      }
    }

    case(
      "attribute",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Attribute { name, .. } => Some(*name),
        _ => None,
      }),
    );

    case(
      "constant",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Constant { name, .. } => Some(*name),
        _ => None,
      }),
    );

    case(
      "function",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Function { name, .. } => Some(*name),
        _ => None,
      }),
    );

    case(
      "setting",
      BUILTINS.iter().filter_map(|builtin| match builtin {
        Builtin::Setting { name, .. } => Some(*name),
        _ => None,
      }),
    );
  }
}