just-bash 2.9.3 → 2.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (750) hide show
  1. package/dist/AGENTS.md +31 -2
  2. package/dist/Bash.d.ts +7 -1
  3. package/dist/bin/chunks/alias-3GODYSFD.js +2 -0
  4. package/dist/bin/chunks/awk2-JBWRWZZH.js +2 -0
  5. package/dist/bin/chunks/base64-OHU2WTUF.js +2 -0
  6. package/dist/bin/chunks/basename-KBUKWB2E.js +2 -0
  7. package/dist/bin/chunks/bash-RJTQJAKW.js +2 -0
  8. package/dist/bin/chunks/cat-3J7U3HHI.js +2 -0
  9. package/dist/bin/chunks/chmod-4O2C4V42.js +2 -0
  10. package/dist/bin/chunks/chunk-26NO42TF.js +14 -0
  11. package/dist/bin/chunks/chunk-2SIXTZCJ.js +5 -0
  12. package/dist/bin/chunks/chunk-3MBAUIBB.js +7 -0
  13. package/dist/bin/chunks/chunk-3Y32LPNT.js +2 -0
  14. package/dist/bin/chunks/chunk-4E3LY6YK.js +10 -0
  15. package/dist/bin/chunks/chunk-4P5OA25Z.js +26 -0
  16. package/dist/bin/chunks/chunk-4PS5JJDT.js +8 -0
  17. package/dist/bin/chunks/chunk-5G2VOPPJ.js +7 -0
  18. package/dist/bin/chunks/chunk-5U7Q4GUC.js +6 -0
  19. package/dist/bin/chunks/chunk-5VFN7VVJ.js +9 -0
  20. package/dist/bin/chunks/chunk-6VUEI2GS.js +9 -0
  21. package/dist/bin/chunks/chunk-7BORMNPQ.js +2 -0
  22. package/dist/bin/chunks/chunk-7ECKLAVW.js +11 -0
  23. package/dist/bin/{shell/chunks/sed-E4QAUCYQ.js → chunks/chunk-7FTB27TY.js} +36 -36
  24. package/dist/bin/chunks/{tr-IAUNBQKH.js → chunk-BDSRLH5T.js} +5 -5
  25. package/dist/bin/chunks/chunk-BYDV4VEF.js +3 -0
  26. package/dist/bin/{shell/chunks/yq-XD7UYY5C.js → chunks/chunk-CHQBMS62.js} +24 -24
  27. package/dist/bin/chunks/chunk-D2GFNFUN.js +7 -0
  28. package/dist/bin/chunks/chunk-DAGNL3F2.js +32 -0
  29. package/dist/bin/chunks/chunk-DSNA7727.js +13 -0
  30. package/dist/bin/chunks/{tar-CLEBMI4R.js → chunk-EFX3F2HZ.js} +6 -6
  31. package/dist/bin/chunks/{rmdir-OEMA5ZTD.js → chunk-EJQKHROT.js} +3 -3
  32. package/dist/bin/chunks/chunk-EUXCM6C4.js +12 -0
  33. package/dist/bin/{shell/chunks/xan-QLNZCWIG.js → chunks/chunk-F26OLHG5.js} +17 -17
  34. package/dist/bin/chunks/chunk-FLPVVSN5.js +5 -0
  35. package/dist/bin/chunks/{chunk-HSNUCOOQ.js → chunk-FZNYF2PQ.js} +2 -2
  36. package/dist/bin/chunks/chunk-ITA43A73.js +7 -0
  37. package/dist/bin/chunks/chunk-IY3BUFJK.js +5 -0
  38. package/dist/bin/chunks/chunk-JLX6YWGA.js +3 -0
  39. package/dist/bin/chunks/chunk-JQBC3FXE.js +8 -0
  40. package/dist/bin/chunks/chunk-JTF74J6E.js +2 -0
  41. package/dist/bin/chunks/chunk-JXC25GVQ.js +5 -0
  42. package/dist/bin/chunks/chunk-K47SEEPI.js +6 -0
  43. package/dist/bin/chunks/chunk-KLMOJKL4.js +16 -0
  44. package/dist/bin/chunks/chunk-KWLLB7S3.js +7 -0
  45. package/dist/bin/chunks/chunk-LJKIWB5F.js +4 -0
  46. package/dist/bin/chunks/chunk-LMK6G2HH.js +8 -0
  47. package/dist/bin/chunks/chunk-MAVV76T4.js +2 -0
  48. package/dist/bin/chunks/chunk-N43DJTSI.js +2 -0
  49. package/dist/bin/chunks/{file-MWSA2WYI.js → chunk-N5OTVT4F.js} +1 -1
  50. package/dist/bin/chunks/{time-F4NVQOJH.js → chunk-N73TVRMN.js} +5 -5
  51. package/dist/bin/chunks/chunk-NEQEZ32M.js +5 -0
  52. package/dist/bin/chunks/{sleep-O5BOTJGJ.js → chunk-NFZDITRV.js} +4 -4
  53. package/dist/bin/chunks/chunk-NSUMEERA.js +12 -0
  54. package/dist/bin/chunks/chunk-OIKCUTTB.js +6 -0
  55. package/dist/bin/chunks/chunk-P6GNZPVW.js +19 -0
  56. package/dist/bin/chunks/chunk-P7UCWJ33.js +12 -0
  57. package/dist/bin/chunks/{sqlite3-CUDCXXK3.js → chunk-PDVXLMUU.js} +9 -9
  58. package/dist/bin/chunks/chunk-PPBQJBC2.js +5 -0
  59. package/dist/bin/chunks/chunk-PQNTKMH3.js +6 -0
  60. package/dist/bin/chunks/chunk-PS4LOXE5.js +8 -0
  61. package/dist/bin/chunks/chunk-Q4AUWUII.js +74 -0
  62. package/dist/bin/{shell/chunks/rg-IZR5557M.js → chunks/chunk-Q4QFIAHB.js} +9 -9
  63. package/dist/bin/chunks/chunk-QXB5WI2V.js +16 -0
  64. package/dist/bin/chunks/chunk-RJSAGJQJ.js +11 -0
  65. package/dist/bin/chunks/chunk-ROJPSS6N.js +3 -0
  66. package/dist/bin/chunks/chunk-RT7TRQVZ.js +3 -0
  67. package/dist/bin/chunks/chunk-S7OHMN3F.js +6 -0
  68. package/dist/bin/chunks/{nl-DSM3NUGM.js → chunk-SGA7Y45Z.js} +7 -7
  69. package/dist/bin/chunks/chunk-STU6KQN4.js +6 -0
  70. package/dist/bin/chunks/chunk-SXRVLCZ4.js +2 -0
  71. package/dist/bin/chunks/chunk-TEFXEYX3.js +3 -0
  72. package/dist/bin/chunks/chunk-THALLNXT.js +7 -0
  73. package/dist/bin/chunks/chunk-THLAHQXV.js +16 -0
  74. package/dist/bin/chunks/chunk-TIDZOIPX.js +3 -0
  75. package/dist/bin/chunks/chunk-VNER2XXL.js +7 -0
  76. package/dist/bin/chunks/chunk-W2FKF3MM.js +9 -0
  77. package/dist/bin/chunks/chunk-WT2HWDDA.js +9 -0
  78. package/dist/bin/chunks/chunk-X2I3PJTX.js +15 -0
  79. package/dist/bin/chunks/chunk-XAL6VWGA.js +9 -0
  80. package/dist/bin/chunks/{html-to-markdown-EPEXKI4B.js → chunk-XKPFI566.js} +9 -9
  81. package/dist/bin/chunks/chunk-YEKSVVRC.js +11 -0
  82. package/dist/bin/chunks/chunk-YLE2OYY6.js +2 -0
  83. package/dist/bin/chunks/chunk-YYQ22ZRL.js +8 -0
  84. package/dist/bin/chunks/chunk-ZA4HUKJ3.js +13 -0
  85. package/dist/bin/chunks/chunk-ZJSZ2BE5.js +21 -0
  86. package/dist/bin/chunks/chunk-ZKC5HQYO.js +14 -0
  87. package/dist/bin/chunks/clear-KRGKPFOI.js +2 -0
  88. package/dist/bin/chunks/column-XGV32UPN.js +2 -0
  89. package/dist/bin/chunks/comm-R3F3Z5DX.js +2 -0
  90. package/dist/bin/chunks/cp-XH2ZB7WT.js +2 -0
  91. package/dist/bin/chunks/cut-HDHQDWRG.js +2 -0
  92. package/dist/bin/chunks/date-6VDN5QZ5.js +2 -0
  93. package/dist/bin/chunks/diff-LE7GMFZD.js +2 -0
  94. package/dist/bin/chunks/dirname-5FAOMLBL.js +2 -0
  95. package/dist/bin/chunks/du-66BNA4IN.js +2 -0
  96. package/dist/bin/chunks/echo-2MUAOGUE.js +2 -0
  97. package/dist/bin/chunks/env-EVLPSWFF.js +2 -0
  98. package/dist/bin/chunks/expand-26XPP5KB.js +2 -0
  99. package/dist/bin/{shell/chunks/expansion-QOAPT4NU.js → chunks/expansion-HIAVHGBZ.js} +1 -1
  100. package/dist/bin/chunks/expr-MLHUWFYI.js +2 -0
  101. package/dist/bin/chunks/file-D5YKS5NV.js +2 -0
  102. package/dist/bin/chunks/find-K777TRNA.js +2 -0
  103. package/dist/bin/chunks/flag-coverage-FNEHS7AY.js +2 -0
  104. package/dist/bin/chunks/fold-XSVNTAWH.js +2 -0
  105. package/dist/bin/chunks/grep-FRIPZKKT.js +2 -0
  106. package/dist/bin/chunks/gzip-EENEW6WQ.js +2 -0
  107. package/dist/bin/chunks/head-YMNRW3F3.js +2 -0
  108. package/dist/bin/chunks/help-JF5TTAKQ.js +2 -0
  109. package/dist/bin/chunks/history-UUKG55YW.js +2 -0
  110. package/dist/bin/chunks/hostname-WY6RKE32.js +2 -0
  111. package/dist/bin/chunks/html-to-markdown-WVZA3MCP.js +2 -0
  112. package/dist/bin/chunks/join-Y4Q5WVVE.js +2 -0
  113. package/dist/bin/chunks/jq-3VHS7DR6.js +2 -0
  114. package/dist/bin/chunks/ln-5TCJXDGY.js +2 -0
  115. package/dist/bin/chunks/ls-ZXYOL67L.js +2 -0
  116. package/dist/bin/chunks/md5sum-NCLXV2S3.js +2 -0
  117. package/dist/bin/chunks/mkdir-6OKMS3KO.js +2 -0
  118. package/dist/bin/chunks/mv-OY7X62QC.js +2 -0
  119. package/dist/bin/chunks/nl-XH3L75DR.js +2 -0
  120. package/dist/bin/chunks/od-52FBC34W.js +2 -0
  121. package/dist/bin/chunks/paste-3UVLMQ2K.js +2 -0
  122. package/dist/bin/chunks/printf-TZC5BRAY.js +2 -0
  123. package/dist/bin/chunks/pwd-6VBAPL3Y.js +2 -0
  124. package/dist/bin/chunks/readlink-YNOUXNUY.js +2 -0
  125. package/dist/bin/chunks/rev-UHEPS2UL.js +2 -0
  126. package/dist/bin/chunks/rg-3R5G2XL4.js +2 -0
  127. package/dist/bin/chunks/rm-5QIBTLJG.js +2 -0
  128. package/dist/bin/chunks/rmdir-5KLM4EA6.js +2 -0
  129. package/dist/bin/chunks/sed-XP3QCHIB.js +2 -0
  130. package/dist/bin/chunks/seq-V7KBLSQ7.js +2 -0
  131. package/dist/bin/chunks/sha1sum-BHNJ5ALF.js +2 -0
  132. package/dist/bin/chunks/sha256sum-HJJ3NJ5L.js +2 -0
  133. package/dist/bin/chunks/sleep-PICQVS6Q.js +2 -0
  134. package/dist/bin/chunks/sort-NZSEYCI6.js +2 -0
  135. package/dist/bin/chunks/split-NOZ7FFXW.js +2 -0
  136. package/dist/bin/chunks/sqlite3-4SEIR46P.js +2 -0
  137. package/dist/bin/chunks/stat-XH7E4E2C.js +2 -0
  138. package/dist/bin/chunks/strings-XXKZCWY5.js +2 -0
  139. package/dist/bin/chunks/tac-TZBNTR4K.js +2 -0
  140. package/dist/bin/chunks/tail-V537TDFR.js +2 -0
  141. package/dist/bin/chunks/tar-7B5KH3QG.js +2 -0
  142. package/dist/bin/chunks/tee-HK2SYCAR.js +2 -0
  143. package/dist/bin/chunks/time-4C3A4THJ.js +2 -0
  144. package/dist/bin/chunks/timeout-RS7REDYT.js +2 -0
  145. package/dist/bin/chunks/touch-DWKSZGOQ.js +2 -0
  146. package/dist/bin/chunks/tr-GDDRKGRB.js +2 -0
  147. package/dist/bin/chunks/tree-HEKABARE.js +2 -0
  148. package/dist/bin/chunks/true-DP5UZP52.js +2 -0
  149. package/dist/bin/chunks/unexpand-OYZ7KOYR.js +2 -0
  150. package/dist/bin/chunks/uniq-FZWFZEN5.js +2 -0
  151. package/dist/bin/chunks/wc-ZIV3TFVG.js +2 -0
  152. package/dist/bin/chunks/which-67WZ6OMV.js +2 -0
  153. package/dist/bin/chunks/whoami-E7PN2UWC.js +2 -0
  154. package/dist/bin/chunks/worker.js +157 -1
  155. package/dist/bin/chunks/xan-EBI2W7YX.js +2 -0
  156. package/dist/bin/chunks/xargs-YWPEV2QC.js +2 -0
  157. package/dist/bin/chunks/yq-O56CEX4T.js +2 -0
  158. package/dist/bin/just-bash.js +192 -190
  159. package/dist/bin/shell/chunks/alias-3GODYSFD.js +2 -0
  160. package/dist/bin/shell/chunks/awk2-JBWRWZZH.js +2 -0
  161. package/dist/bin/shell/chunks/base64-OHU2WTUF.js +2 -0
  162. package/dist/bin/shell/chunks/basename-KBUKWB2E.js +2 -0
  163. package/dist/bin/shell/chunks/bash-RJTQJAKW.js +2 -0
  164. package/dist/bin/shell/chunks/cat-3J7U3HHI.js +2 -0
  165. package/dist/bin/shell/chunks/chmod-4O2C4V42.js +2 -0
  166. package/dist/bin/shell/chunks/chunk-26NO42TF.js +14 -0
  167. package/dist/bin/shell/chunks/chunk-2SIXTZCJ.js +5 -0
  168. package/dist/bin/shell/chunks/chunk-3MBAUIBB.js +7 -0
  169. package/dist/bin/shell/chunks/chunk-3Y32LPNT.js +2 -0
  170. package/dist/bin/shell/chunks/chunk-4E3LY6YK.js +10 -0
  171. package/dist/bin/shell/chunks/chunk-4P5OA25Z.js +26 -0
  172. package/dist/bin/shell/chunks/chunk-4PS5JJDT.js +8 -0
  173. package/dist/bin/shell/chunks/chunk-5G2VOPPJ.js +7 -0
  174. package/dist/bin/shell/chunks/chunk-5U7Q4GUC.js +6 -0
  175. package/dist/bin/shell/chunks/chunk-5VFN7VVJ.js +9 -0
  176. package/dist/bin/shell/chunks/chunk-6VUEI2GS.js +9 -0
  177. package/dist/bin/shell/chunks/chunk-7BORMNPQ.js +2 -0
  178. package/dist/bin/shell/chunks/chunk-7ECKLAVW.js +11 -0
  179. package/dist/bin/{chunks/sed-E4QAUCYQ.js → shell/chunks/chunk-7FTB27TY.js} +36 -36
  180. package/dist/bin/shell/chunks/{tr-IAUNBQKH.js → chunk-BDSRLH5T.js} +5 -5
  181. package/dist/bin/shell/chunks/chunk-BYDV4VEF.js +3 -0
  182. package/dist/bin/{chunks/yq-XD7UYY5C.js → shell/chunks/chunk-CHQBMS62.js} +24 -24
  183. package/dist/bin/shell/chunks/chunk-D2GFNFUN.js +7 -0
  184. package/dist/bin/shell/chunks/chunk-DAGNL3F2.js +32 -0
  185. package/dist/bin/shell/chunks/chunk-DSNA7727.js +13 -0
  186. package/dist/bin/shell/chunks/{tar-CLEBMI4R.js → chunk-EFX3F2HZ.js} +6 -6
  187. package/dist/bin/shell/chunks/{rmdir-OEMA5ZTD.js → chunk-EJQKHROT.js} +3 -3
  188. package/dist/bin/shell/chunks/chunk-EUXCM6C4.js +12 -0
  189. package/dist/bin/{chunks/xan-QLNZCWIG.js → shell/chunks/chunk-F26OLHG5.js} +17 -17
  190. package/dist/bin/shell/chunks/chunk-FLPVVSN5.js +5 -0
  191. package/dist/bin/shell/chunks/{chunk-HSNUCOOQ.js → chunk-FZNYF2PQ.js} +2 -2
  192. package/dist/bin/shell/chunks/chunk-ITA43A73.js +7 -0
  193. package/dist/bin/shell/chunks/chunk-IY3BUFJK.js +5 -0
  194. package/dist/bin/shell/chunks/chunk-JLX6YWGA.js +3 -0
  195. package/dist/bin/shell/chunks/chunk-JQBC3FXE.js +8 -0
  196. package/dist/bin/shell/chunks/chunk-JTF74J6E.js +2 -0
  197. package/dist/bin/shell/chunks/chunk-JXC25GVQ.js +5 -0
  198. package/dist/bin/shell/chunks/chunk-K47SEEPI.js +6 -0
  199. package/dist/bin/shell/chunks/chunk-KLMOJKL4.js +16 -0
  200. package/dist/bin/shell/chunks/chunk-KWLLB7S3.js +7 -0
  201. package/dist/bin/shell/chunks/chunk-LJKIWB5F.js +4 -0
  202. package/dist/bin/shell/chunks/chunk-LMK6G2HH.js +8 -0
  203. package/dist/bin/shell/chunks/chunk-MAVV76T4.js +2 -0
  204. package/dist/bin/shell/chunks/chunk-N43DJTSI.js +2 -0
  205. package/dist/bin/shell/chunks/{file-MWSA2WYI.js → chunk-N5OTVT4F.js} +1 -1
  206. package/dist/bin/shell/chunks/{time-F4NVQOJH.js → chunk-N73TVRMN.js} +5 -5
  207. package/dist/bin/shell/chunks/chunk-NEQEZ32M.js +5 -0
  208. package/dist/bin/shell/chunks/{sleep-O5BOTJGJ.js → chunk-NFZDITRV.js} +4 -4
  209. package/dist/bin/shell/chunks/chunk-NSUMEERA.js +12 -0
  210. package/dist/bin/shell/chunks/chunk-OIKCUTTB.js +6 -0
  211. package/dist/bin/shell/chunks/chunk-P6GNZPVW.js +19 -0
  212. package/dist/bin/shell/chunks/chunk-P7UCWJ33.js +12 -0
  213. package/dist/bin/shell/chunks/{sqlite3-CUDCXXK3.js → chunk-PDVXLMUU.js} +9 -9
  214. package/dist/bin/shell/chunks/chunk-PPBQJBC2.js +5 -0
  215. package/dist/bin/shell/chunks/chunk-PQNTKMH3.js +6 -0
  216. package/dist/bin/shell/chunks/chunk-PS4LOXE5.js +8 -0
  217. package/dist/bin/shell/chunks/chunk-Q4AUWUII.js +74 -0
  218. package/dist/bin/{chunks/rg-IZR5557M.js → shell/chunks/chunk-Q4QFIAHB.js} +9 -9
  219. package/dist/bin/shell/chunks/chunk-QXB5WI2V.js +16 -0
  220. package/dist/bin/shell/chunks/chunk-RJSAGJQJ.js +11 -0
  221. package/dist/bin/shell/chunks/chunk-ROJPSS6N.js +3 -0
  222. package/dist/bin/shell/chunks/chunk-RT7TRQVZ.js +3 -0
  223. package/dist/bin/shell/chunks/chunk-S7OHMN3F.js +6 -0
  224. package/dist/bin/shell/chunks/{nl-DSM3NUGM.js → chunk-SGA7Y45Z.js} +7 -7
  225. package/dist/bin/shell/chunks/chunk-STU6KQN4.js +6 -0
  226. package/dist/bin/shell/chunks/chunk-SXRVLCZ4.js +2 -0
  227. package/dist/bin/shell/chunks/chunk-TEFXEYX3.js +3 -0
  228. package/dist/bin/shell/chunks/chunk-THALLNXT.js +7 -0
  229. package/dist/bin/shell/chunks/chunk-THLAHQXV.js +16 -0
  230. package/dist/bin/shell/chunks/chunk-TIDZOIPX.js +3 -0
  231. package/dist/bin/shell/chunks/chunk-VNER2XXL.js +7 -0
  232. package/dist/bin/shell/chunks/chunk-W2FKF3MM.js +9 -0
  233. package/dist/bin/shell/chunks/chunk-WT2HWDDA.js +9 -0
  234. package/dist/bin/shell/chunks/chunk-X2I3PJTX.js +15 -0
  235. package/dist/bin/shell/chunks/chunk-XAL6VWGA.js +9 -0
  236. package/dist/bin/shell/chunks/{html-to-markdown-EPEXKI4B.js → chunk-XKPFI566.js} +9 -9
  237. package/dist/bin/shell/chunks/chunk-YEKSVVRC.js +11 -0
  238. package/dist/bin/shell/chunks/chunk-YLE2OYY6.js +2 -0
  239. package/dist/bin/shell/chunks/chunk-YYQ22ZRL.js +8 -0
  240. package/dist/bin/shell/chunks/chunk-ZA4HUKJ3.js +13 -0
  241. package/dist/bin/shell/chunks/chunk-ZJSZ2BE5.js +21 -0
  242. package/dist/bin/shell/chunks/chunk-ZKC5HQYO.js +14 -0
  243. package/dist/bin/shell/chunks/clear-KRGKPFOI.js +2 -0
  244. package/dist/bin/shell/chunks/column-XGV32UPN.js +2 -0
  245. package/dist/bin/shell/chunks/comm-R3F3Z5DX.js +2 -0
  246. package/dist/bin/shell/chunks/cp-XH2ZB7WT.js +2 -0
  247. package/dist/bin/shell/chunks/cut-HDHQDWRG.js +2 -0
  248. package/dist/bin/shell/chunks/date-6VDN5QZ5.js +2 -0
  249. package/dist/bin/shell/chunks/diff-LE7GMFZD.js +2 -0
  250. package/dist/bin/shell/chunks/dirname-5FAOMLBL.js +2 -0
  251. package/dist/bin/shell/chunks/du-66BNA4IN.js +2 -0
  252. package/dist/bin/shell/chunks/echo-2MUAOGUE.js +2 -0
  253. package/dist/bin/shell/chunks/env-EVLPSWFF.js +2 -0
  254. package/dist/bin/shell/chunks/expand-26XPP5KB.js +2 -0
  255. package/dist/bin/{chunks/expansion-QOAPT4NU.js → shell/chunks/expansion-HIAVHGBZ.js} +1 -1
  256. package/dist/bin/shell/chunks/expr-MLHUWFYI.js +2 -0
  257. package/dist/bin/shell/chunks/file-D5YKS5NV.js +2 -0
  258. package/dist/bin/shell/chunks/find-K777TRNA.js +2 -0
  259. package/dist/bin/shell/chunks/flag-coverage-FNEHS7AY.js +2 -0
  260. package/dist/bin/shell/chunks/fold-XSVNTAWH.js +2 -0
  261. package/dist/bin/shell/chunks/grep-FRIPZKKT.js +2 -0
  262. package/dist/bin/shell/chunks/gzip-EENEW6WQ.js +2 -0
  263. package/dist/bin/shell/chunks/head-YMNRW3F3.js +2 -0
  264. package/dist/bin/shell/chunks/help-JF5TTAKQ.js +2 -0
  265. package/dist/bin/shell/chunks/history-UUKG55YW.js +2 -0
  266. package/dist/bin/shell/chunks/hostname-WY6RKE32.js +2 -0
  267. package/dist/bin/shell/chunks/html-to-markdown-WVZA3MCP.js +2 -0
  268. package/dist/bin/shell/chunks/join-Y4Q5WVVE.js +2 -0
  269. package/dist/bin/shell/chunks/jq-3VHS7DR6.js +2 -0
  270. package/dist/bin/shell/chunks/ln-5TCJXDGY.js +2 -0
  271. package/dist/bin/shell/chunks/ls-ZXYOL67L.js +2 -0
  272. package/dist/bin/shell/chunks/md5sum-NCLXV2S3.js +2 -0
  273. package/dist/bin/shell/chunks/mkdir-6OKMS3KO.js +2 -0
  274. package/dist/bin/shell/chunks/mv-OY7X62QC.js +2 -0
  275. package/dist/bin/shell/chunks/nl-XH3L75DR.js +2 -0
  276. package/dist/bin/shell/chunks/od-52FBC34W.js +2 -0
  277. package/dist/bin/shell/chunks/paste-3UVLMQ2K.js +2 -0
  278. package/dist/bin/shell/chunks/printf-TZC5BRAY.js +2 -0
  279. package/dist/bin/shell/chunks/pwd-6VBAPL3Y.js +2 -0
  280. package/dist/bin/shell/chunks/readlink-YNOUXNUY.js +2 -0
  281. package/dist/bin/shell/chunks/rev-UHEPS2UL.js +2 -0
  282. package/dist/bin/shell/chunks/rg-3R5G2XL4.js +2 -0
  283. package/dist/bin/shell/chunks/rm-5QIBTLJG.js +2 -0
  284. package/dist/bin/shell/chunks/rmdir-5KLM4EA6.js +2 -0
  285. package/dist/bin/shell/chunks/sed-XP3QCHIB.js +2 -0
  286. package/dist/bin/shell/chunks/seq-V7KBLSQ7.js +2 -0
  287. package/dist/bin/shell/chunks/sha1sum-BHNJ5ALF.js +2 -0
  288. package/dist/bin/shell/chunks/sha256sum-HJJ3NJ5L.js +2 -0
  289. package/dist/bin/shell/chunks/sleep-PICQVS6Q.js +2 -0
  290. package/dist/bin/shell/chunks/sort-NZSEYCI6.js +2 -0
  291. package/dist/bin/shell/chunks/split-NOZ7FFXW.js +2 -0
  292. package/dist/bin/shell/chunks/sqlite3-4SEIR46P.js +2 -0
  293. package/dist/bin/shell/chunks/stat-XH7E4E2C.js +2 -0
  294. package/dist/bin/shell/chunks/strings-XXKZCWY5.js +2 -0
  295. package/dist/bin/shell/chunks/tac-TZBNTR4K.js +2 -0
  296. package/dist/bin/shell/chunks/tail-V537TDFR.js +2 -0
  297. package/dist/bin/shell/chunks/tar-7B5KH3QG.js +2 -0
  298. package/dist/bin/shell/chunks/tee-HK2SYCAR.js +2 -0
  299. package/dist/bin/shell/chunks/time-4C3A4THJ.js +2 -0
  300. package/dist/bin/shell/chunks/timeout-RS7REDYT.js +2 -0
  301. package/dist/bin/shell/chunks/touch-DWKSZGOQ.js +2 -0
  302. package/dist/bin/shell/chunks/tr-GDDRKGRB.js +2 -0
  303. package/dist/bin/shell/chunks/tree-HEKABARE.js +2 -0
  304. package/dist/bin/shell/chunks/true-DP5UZP52.js +2 -0
  305. package/dist/bin/shell/chunks/unexpand-OYZ7KOYR.js +2 -0
  306. package/dist/bin/shell/chunks/uniq-FZWFZEN5.js +2 -0
  307. package/dist/bin/shell/chunks/wc-ZIV3TFVG.js +2 -0
  308. package/dist/bin/shell/chunks/which-67WZ6OMV.js +2 -0
  309. package/dist/bin/shell/chunks/whoami-E7PN2UWC.js +2 -0
  310. package/dist/bin/shell/chunks/xan-EBI2W7YX.js +2 -0
  311. package/dist/bin/shell/chunks/xargs-YWPEV2QC.js +2 -0
  312. package/dist/bin/shell/chunks/yq-O56CEX4T.js +2 -0
  313. package/dist/bin/shell/shell.js +195 -193
  314. package/dist/bundle/browser.js +774 -772
  315. package/dist/bundle/chunks/alias-JE7RI5QX.js +1 -0
  316. package/dist/bundle/chunks/awk2-M5NFQRYA.js +1 -0
  317. package/dist/bundle/chunks/base64-HYOQ5I2F.js +1 -0
  318. package/dist/bundle/chunks/basename-AA2KJYZQ.js +1 -0
  319. package/dist/bundle/chunks/bash-OVBCDR7G.js +1 -0
  320. package/dist/bundle/chunks/cat-C2OBLGHA.js +1 -0
  321. package/dist/bundle/chunks/chmod-MIKE3OIT.js +1 -0
  322. package/dist/bundle/chunks/chunk-27LMNKBP.js +7 -0
  323. package/dist/bundle/chunks/chunk-4HHKTUW3.js +2 -0
  324. package/dist/bundle/chunks/chunk-4Q4SM6WR.js +4 -0
  325. package/dist/bundle/chunks/chunk-55VFSPNA.js +2 -0
  326. package/dist/bundle/chunks/chunk-5V6VZH6T.js +1 -0
  327. package/dist/bundle/chunks/chunk-64BAICW3.js +1 -0
  328. package/dist/bundle/chunks/chunk-6NY2AP72.js +5 -0
  329. package/dist/bundle/chunks/chunk-7C6RBHP3.js +4 -0
  330. package/dist/bundle/chunks/chunk-7DBA735O.js +5 -0
  331. package/dist/bundle/chunks/chunk-A4HU7SVR.js +2 -0
  332. package/dist/bundle/chunks/chunk-A4JSPFCI.js +6 -0
  333. package/dist/bundle/chunks/chunk-A7A2DBEE.js +6 -0
  334. package/dist/bundle/chunks/chunk-A7ICOL4V.js +13 -0
  335. package/dist/bundle/chunks/chunk-ALLTKNUZ.js +5 -0
  336. package/dist/bundle/chunks/chunk-APT7OOP2.js +1 -0
  337. package/dist/bundle/chunks/chunk-CCL4U6Q4.js +73 -0
  338. package/dist/bundle/chunks/{file-APPTAFMI.js → chunk-CR5AFCPT.js} +1 -1
  339. package/dist/bundle/chunks/{time-EGF4KTWV.js → chunk-CSBFBYLD.js} +5 -5
  340. package/dist/bundle/chunks/chunk-D4J545R4.js +11 -0
  341. package/dist/bundle/chunks/chunk-DCAAORBQ.js +1 -0
  342. package/dist/bundle/chunks/chunk-DZ33S2U7.js +31 -0
  343. package/dist/bundle/chunks/{nl-KWQGFZH5.js → chunk-F23WWYKW.js} +7 -7
  344. package/dist/bundle/chunks/chunk-GCTKCWKD.js +3 -0
  345. package/dist/bundle/chunks/{yq-JD6M7T5A.js → chunk-GOBUJIHS.js} +24 -24
  346. package/dist/bundle/chunks/chunk-GQ7SJRUH.js +12 -0
  347. package/dist/bundle/chunks/chunk-GXVXFKBA.js +5 -0
  348. package/dist/bundle/chunks/chunk-GZ2N3SXD.js +8 -0
  349. package/dist/bundle/chunks/{sqlite3-DK5YHTWU.js → chunk-HDZ4QEVJ.js} +9 -9
  350. package/dist/bundle/chunks/chunk-HJQJAYMS.js +2 -0
  351. package/dist/bundle/chunks/chunk-HXILPMCG.js +5 -0
  352. package/dist/bundle/chunks/chunk-IKZ5LEGB.js +6 -0
  353. package/dist/bundle/chunks/chunk-JSZMK2JZ.js +5 -0
  354. package/dist/bundle/chunks/chunk-JVPRLUMK.js +7 -0
  355. package/dist/bundle/chunks/chunk-K3PAWJ7V.js +7 -0
  356. package/dist/bundle/chunks/chunk-KAEMRWOH.js +15 -0
  357. package/dist/bundle/chunks/chunk-KTGH7NTP.js +15 -0
  358. package/dist/bundle/chunks/chunk-KY5VPZXG.js +23 -0
  359. package/dist/bundle/chunks/{printf-4U5V2VHK.js → chunk-L4KW73FJ.js} +11 -11
  360. package/dist/bundle/chunks/chunk-LL3S3NLB.js +1 -0
  361. package/dist/bundle/chunks/chunk-LWEGUNWT.js +7 -0
  362. package/dist/bundle/chunks/chunk-MDLLFABN.js +4 -0
  363. package/dist/bundle/chunks/chunk-NCNPKYJZ.js +2 -0
  364. package/dist/bundle/chunks/chunk-NQOQ2Q77.js +8 -0
  365. package/dist/bundle/chunks/chunk-NUYSJFDK.js +7 -0
  366. package/dist/bundle/chunks/chunk-OCK72LWW.js +4 -0
  367. package/dist/bundle/chunks/chunk-OCLXQMOG.js +6 -0
  368. package/dist/bundle/chunks/{rmdir-DU6C7ZEO.js → chunk-OCS6LSEM.js} +3 -3
  369. package/dist/bundle/chunks/chunk-OFJTSXN6.js +8 -0
  370. package/dist/bundle/chunks/chunk-OGDTSM2Q.js +8 -0
  371. package/dist/bundle/chunks/chunk-PP6PSHAB.js +4 -0
  372. package/dist/bundle/chunks/chunk-PYSFUGCK.js +10 -0
  373. package/dist/bundle/chunks/chunk-QCDB2VPH.js +6 -0
  374. package/dist/bundle/chunks/{rg-JNKRPEYR.js → chunk-QOENL5UZ.js} +9 -9
  375. package/dist/bundle/chunks/chunk-R6QSAL5T.js +1 -0
  376. package/dist/bundle/chunks/{chunk-WQCJYUEW.js → chunk-RSXSWZBQ.js} +2 -2
  377. package/dist/bundle/chunks/chunk-S6BBC45K.js +8 -0
  378. package/dist/bundle/chunks/chunk-SL4FN3A5.js +9 -0
  379. package/dist/bundle/chunks/chunk-SXR3EI72.js +4 -0
  380. package/dist/bundle/chunks/chunk-TLSUDHID.js +6 -0
  381. package/dist/bundle/chunks/chunk-U7QI5ZS5.js +4 -0
  382. package/dist/bundle/chunks/{xan-EN6JZQ3T.js → chunk-UAHZJD43.js} +17 -17
  383. package/dist/bundle/chunks/chunk-UYGR3CFC.js +2 -0
  384. package/dist/bundle/chunks/chunk-VJFXDYWH.js +10 -0
  385. package/dist/bundle/chunks/chunk-VOBGTVA6.js +6 -0
  386. package/dist/bundle/chunks/{sed-4K5HXNXE.js → chunk-VTHR2H5Q.js} +36 -36
  387. package/dist/bundle/chunks/chunk-VYOJP4TV.js +13 -0
  388. package/dist/bundle/chunks/{tar-5V4PGBFL.js → chunk-VZWXH2PZ.js} +6 -6
  389. package/dist/bundle/chunks/chunk-WEIVGBP5.js +20 -0
  390. package/dist/bundle/chunks/chunk-WMLBQOWO.js +9 -0
  391. package/dist/bundle/chunks/{tr-UJSEBPIQ.js → chunk-X6JMGGW2.js} +5 -5
  392. package/dist/bundle/chunks/chunk-XKQRETAK.js +1 -0
  393. package/dist/bundle/chunks/chunk-XNL7YAHW.js +11 -0
  394. package/dist/bundle/chunks/chunk-XVDPCNWR.js +11 -0
  395. package/dist/bundle/chunks/chunk-XZ3MZS57.js +6 -0
  396. package/dist/bundle/chunks/chunk-YYB54I7F.js +10 -0
  397. package/dist/bundle/chunks/chunk-Z7JVV2SM.js +12 -0
  398. package/dist/bundle/chunks/chunk-ZKLK6C7H.js +15 -0
  399. package/dist/bundle/chunks/clear-5CZ5X4YR.js +1 -0
  400. package/dist/bundle/chunks/column-WLPMMSTS.js +1 -0
  401. package/dist/bundle/chunks/comm-5SLSESQG.js +1 -0
  402. package/dist/bundle/chunks/cp-XOYR4ABJ.js +1 -0
  403. package/dist/bundle/chunks/cut-LO6YYY5P.js +1 -0
  404. package/dist/bundle/chunks/date-FT2P5UCQ.js +1 -0
  405. package/dist/bundle/chunks/diff-HJF2MPDN.js +1 -0
  406. package/dist/bundle/chunks/dirname-LEMTZZFS.js +1 -0
  407. package/dist/bundle/chunks/du-DM4QX4XA.js +1 -0
  408. package/dist/bundle/chunks/echo-O45JWWI2.js +1 -0
  409. package/dist/bundle/chunks/env-S547XMN7.js +1 -0
  410. package/dist/bundle/chunks/expand-DTNXU4LQ.js +1 -0
  411. package/dist/bundle/chunks/{expansion-7IMG6HKQ.js → expansion-R2VVQUSY.js} +1 -1
  412. package/dist/bundle/chunks/expr-3572LAOT.js +1 -0
  413. package/dist/bundle/chunks/file-ZIGAJ4YS.js +1 -0
  414. package/dist/bundle/chunks/find-74OP3M7S.js +1 -0
  415. package/dist/bundle/chunks/flag-coverage-KDDXWVDJ.js +1 -0
  416. package/dist/bundle/chunks/fold-LDSORVYE.js +1 -0
  417. package/dist/bundle/chunks/grep-BPEMMINR.js +1 -0
  418. package/dist/bundle/chunks/gzip-UTSGNF5Z.js +1 -0
  419. package/dist/bundle/chunks/head-HT2B6D2J.js +1 -0
  420. package/dist/bundle/chunks/help-T2NGLTSG.js +1 -0
  421. package/dist/bundle/chunks/history-J4QRNGRO.js +1 -0
  422. package/dist/bundle/chunks/hostname-BK6HG2DE.js +1 -0
  423. package/dist/bundle/chunks/html-to-markdown-TFCECAGV.js +1 -0
  424. package/dist/bundle/chunks/join-GG2LDHE5.js +1 -0
  425. package/dist/bundle/chunks/jq-HA6MN2H5.js +1 -0
  426. package/dist/bundle/chunks/ln-YAIFIHCT.js +1 -0
  427. package/dist/bundle/chunks/ls-OTONBH2E.js +1 -0
  428. package/dist/bundle/chunks/md5sum-INMIK4DX.js +1 -0
  429. package/dist/bundle/chunks/mkdir-QWGXDWUS.js +1 -0
  430. package/dist/bundle/chunks/mv-Z6MORUFL.js +1 -0
  431. package/dist/bundle/chunks/nl-U5YJDM32.js +1 -0
  432. package/dist/bundle/chunks/od-VJEF2UR5.js +1 -0
  433. package/dist/bundle/chunks/paste-7N6AFSDS.js +1 -0
  434. package/dist/bundle/chunks/printf-KGN6BDCY.js +1 -0
  435. package/dist/bundle/chunks/pwd-D4OZ7N27.js +1 -0
  436. package/dist/bundle/chunks/readlink-IEQO24KU.js +1 -0
  437. package/dist/bundle/chunks/rev-XOSYPP45.js +1 -0
  438. package/dist/bundle/chunks/rg-ORQK4GVH.js +1 -0
  439. package/dist/bundle/chunks/rm-KPTLPKPH.js +1 -0
  440. package/dist/bundle/chunks/rmdir-XTQXT7RK.js +1 -0
  441. package/dist/bundle/chunks/sed-MUVA7R2C.js +1 -0
  442. package/dist/bundle/chunks/seq-RN5ZUASB.js +1 -0
  443. package/dist/bundle/chunks/sha1sum-VJPNLNU6.js +1 -0
  444. package/dist/bundle/chunks/sha256sum-PI32XWXY.js +1 -0
  445. package/dist/bundle/chunks/sleep-JHK4I472.js +1 -0
  446. package/dist/bundle/chunks/sort-T7TNLWXL.js +1 -0
  447. package/dist/bundle/chunks/split-EZOC5IIZ.js +1 -0
  448. package/dist/bundle/chunks/sqlite3-Z2IGWYCE.js +1 -0
  449. package/dist/bundle/chunks/stat-74KBZFAX.js +1 -0
  450. package/dist/bundle/chunks/strings-7PLOGTPD.js +1 -0
  451. package/dist/bundle/chunks/tac-T7YAU2Y6.js +1 -0
  452. package/dist/bundle/chunks/tail-S5ULNTJU.js +1 -0
  453. package/dist/bundle/chunks/tar-K7K7BL55.js +1 -0
  454. package/dist/bundle/chunks/tee-O7VXZDCO.js +1 -0
  455. package/dist/bundle/chunks/time-BPT76IHZ.js +1 -0
  456. package/dist/bundle/chunks/timeout-5UJUQXOE.js +1 -0
  457. package/dist/bundle/chunks/touch-DX2IJOQ4.js +1 -0
  458. package/dist/bundle/chunks/tr-RYO2EDCA.js +1 -0
  459. package/dist/bundle/chunks/tree-LYXBS7DC.js +1 -0
  460. package/dist/bundle/chunks/true-WHJNXCHG.js +1 -0
  461. package/dist/bundle/chunks/unexpand-RGTMIGZM.js +1 -0
  462. package/dist/bundle/chunks/uniq-ZXE4O5XB.js +1 -0
  463. package/dist/bundle/chunks/wc-TQB3VNOX.js +1 -0
  464. package/dist/bundle/chunks/which-NCIYTMAT.js +1 -0
  465. package/dist/bundle/chunks/whoami-DGKU3D2X.js +1 -0
  466. package/dist/bundle/chunks/worker.js +157 -1
  467. package/dist/bundle/chunks/xan-6DLWA2BW.js +1 -0
  468. package/dist/bundle/chunks/xargs-OGI2NN6J.js +1 -0
  469. package/dist/bundle/chunks/yq-LO2NVDTD.js +1 -0
  470. package/dist/bundle/index.js +185 -183
  471. package/dist/commands/alias/alias.d.ts +3 -0
  472. package/dist/commands/awk/awk2.d.ts +2 -0
  473. package/dist/commands/awk/interpreter/context.d.ts +5 -0
  474. package/dist/commands/base64/base64.d.ts +2 -0
  475. package/dist/commands/basename/basename.d.ts +2 -0
  476. package/dist/commands/bash/bash.d.ts +3 -0
  477. package/dist/commands/cat/cat.d.ts +2 -0
  478. package/dist/commands/chmod/chmod.d.ts +2 -0
  479. package/dist/commands/clear/clear.d.ts +2 -0
  480. package/dist/commands/column/column.d.ts +2 -0
  481. package/dist/commands/comm/comm.d.ts +2 -0
  482. package/dist/commands/cp/cp.d.ts +2 -0
  483. package/dist/commands/cut/cut.d.ts +2 -0
  484. package/dist/commands/date/date.d.ts +2 -0
  485. package/dist/commands/diff/diff.d.ts +2 -0
  486. package/dist/commands/dirname/dirname.d.ts +2 -0
  487. package/dist/commands/du/du.d.ts +2 -0
  488. package/dist/commands/echo/echo.d.ts +2 -0
  489. package/dist/commands/env/env.d.ts +3 -0
  490. package/dist/commands/expand/expand.d.ts +2 -0
  491. package/dist/commands/expand/unexpand.d.ts +2 -0
  492. package/dist/commands/expr/expr.d.ts +2 -0
  493. package/dist/commands/file/file.d.ts +2 -0
  494. package/dist/commands/find/find.d.ts +2 -0
  495. package/dist/commands/flag-coverage.d.ts +2 -0
  496. package/dist/commands/fold/fold.d.ts +2 -0
  497. package/dist/commands/fuzz-flags-types.d.ts +17 -0
  498. package/dist/commands/fuzz-flags.d.ts +8 -0
  499. package/dist/commands/grep/grep.d.ts +4 -0
  500. package/dist/commands/gzip/gzip.d.ts +4 -0
  501. package/dist/commands/head/head.d.ts +2 -0
  502. package/dist/commands/help/help.d.ts +2 -0
  503. package/dist/commands/history/history.d.ts +2 -0
  504. package/dist/commands/hostname/hostname.d.ts +2 -0
  505. package/dist/commands/html-to-markdown/html-to-markdown.d.ts +2 -0
  506. package/dist/commands/join/join.d.ts +2 -0
  507. package/dist/commands/jq/jq.d.ts +2 -0
  508. package/dist/commands/ln/ln.d.ts +2 -0
  509. package/dist/commands/ls/ls.d.ts +2 -0
  510. package/dist/commands/md5sum/md5sum.d.ts +2 -0
  511. package/dist/commands/md5sum/sha1sum.d.ts +2 -0
  512. package/dist/commands/md5sum/sha256sum.d.ts +2 -0
  513. package/dist/commands/mkdir/mkdir.d.ts +2 -0
  514. package/dist/commands/mv/mv.d.ts +2 -0
  515. package/dist/commands/nl/nl.d.ts +2 -0
  516. package/dist/commands/od/od.d.ts +2 -0
  517. package/dist/commands/paste/paste.d.ts +2 -0
  518. package/dist/commands/printf/printf.d.ts +2 -0
  519. package/dist/commands/pwd/pwd.d.ts +2 -0
  520. package/dist/commands/query-engine/evaluator.d.ts +4 -0
  521. package/dist/commands/readlink/readlink.d.ts +2 -0
  522. package/dist/commands/rev/rev.d.ts +2 -0
  523. package/dist/commands/rg/rg.d.ts +2 -0
  524. package/dist/commands/rm/rm.d.ts +2 -0
  525. package/dist/commands/rmdir/rmdir.d.ts +2 -0
  526. package/dist/commands/sed/sed.d.ts +2 -0
  527. package/dist/commands/sed/types.d.ts +2 -0
  528. package/dist/commands/seq/seq.d.ts +2 -0
  529. package/dist/commands/sleep/sleep.d.ts +2 -0
  530. package/dist/commands/sort/sort.d.ts +2 -0
  531. package/dist/commands/split/split.d.ts +2 -0
  532. package/dist/commands/sqlite3/sqlite3.d.ts +2 -0
  533. package/dist/commands/stat/stat.d.ts +2 -0
  534. package/dist/commands/strings/strings.d.ts +2 -0
  535. package/dist/commands/tac/tac.d.ts +2 -0
  536. package/dist/commands/tail/tail.d.ts +2 -0
  537. package/dist/commands/tar/tar.d.ts +2 -0
  538. package/dist/commands/tee/tee.d.ts +2 -0
  539. package/dist/commands/time/time.d.ts +2 -0
  540. package/dist/commands/timeout/timeout.d.ts +2 -0
  541. package/dist/commands/touch/touch.d.ts +2 -0
  542. package/dist/commands/tr/tr.d.ts +2 -0
  543. package/dist/commands/tree/tree.d.ts +2 -0
  544. package/dist/commands/true/true.d.ts +3 -0
  545. package/dist/commands/uniq/uniq.d.ts +2 -0
  546. package/dist/commands/wc/wc.d.ts +2 -0
  547. package/dist/commands/which/which.d.ts +2 -0
  548. package/dist/commands/whoami/whoami.d.ts +2 -0
  549. package/dist/commands/xan/xan.d.ts +2 -0
  550. package/dist/commands/xargs/xargs.d.ts +2 -0
  551. package/dist/commands/yq/yq.d.ts +2 -0
  552. package/dist/fs/overlay-fs/overlay-fs.d.ts +7 -0
  553. package/dist/fs/read-write-fs/read-write-fs.d.ts +7 -0
  554. package/dist/interpreter/interpreter.d.ts +3 -1
  555. package/dist/interpreter/types.d.ts +3 -1
  556. package/dist/network/types.d.ts +11 -0
  557. package/dist/parser/parser.d.ts +6 -0
  558. package/dist/parser/types.d.ts +1 -0
  559. package/dist/types.d.ts +12 -0
  560. package/package.json +4 -4
  561. package/dist/bin/chunks/alias-MGDOL4KG.js +0 -7
  562. package/dist/bin/chunks/awk2-OKD2P6CM.js +0 -21
  563. package/dist/bin/chunks/base64-43KPK6TL.js +0 -6
  564. package/dist/bin/chunks/basename-SO5MVUEX.js +0 -6
  565. package/dist/bin/chunks/bash-OAUBNRSG.js +0 -6
  566. package/dist/bin/chunks/cat-HNXE2ES2.js +0 -6
  567. package/dist/bin/chunks/chmod-TYLTHXFR.js +0 -9
  568. package/dist/bin/chunks/chunk-2ODUA7YH.js +0 -74
  569. package/dist/bin/chunks/clear-CI7A5IXQ.js +0 -2
  570. package/dist/bin/chunks/column-HQ4AK5DM.js +0 -8
  571. package/dist/bin/chunks/comm-CPIFQTKY.js +0 -13
  572. package/dist/bin/chunks/cp-VFXCUKXO.js +0 -8
  573. package/dist/bin/chunks/cut-IHF6BEOO.js +0 -6
  574. package/dist/bin/chunks/date-IQLPMFYI.js +0 -5
  575. package/dist/bin/chunks/diff-ZGXLP3DN.js +0 -19
  576. package/dist/bin/chunks/dirname-EES7TR26.js +0 -5
  577. package/dist/bin/chunks/du-PECPOFQT.js +0 -8
  578. package/dist/bin/chunks/echo-7I42V66Q.js +0 -4
  579. package/dist/bin/chunks/env-W6IMQ43Y.js +0 -9
  580. package/dist/bin/chunks/expand-77K5HH2M.js +0 -11
  581. package/dist/bin/chunks/expr-433HIVAI.js +0 -5
  582. package/dist/bin/chunks/find-KHOYETRP.js +0 -11
  583. package/dist/bin/chunks/fold-452R4I2C.js +0 -12
  584. package/dist/bin/chunks/grep-BD56656Z.js +0 -9
  585. package/dist/bin/chunks/gzip-5ILPB46W.js +0 -32
  586. package/dist/bin/chunks/head-TJHLLIMR.js +0 -2
  587. package/dist/bin/chunks/help-L43ENI4H.js +0 -16
  588. package/dist/bin/chunks/history-56DL6SXU.js +0 -3
  589. package/dist/bin/chunks/hostname-WXDKRL2Z.js +0 -3
  590. package/dist/bin/chunks/join-3IXMEGNA.js +0 -14
  591. package/dist/bin/chunks/jq-EIPK4SZA.js +0 -13
  592. package/dist/bin/chunks/ln-EFFNQ3RY.js +0 -10
  593. package/dist/bin/chunks/ls-5LN47VHU.js +0 -26
  594. package/dist/bin/chunks/md5sum-VHPDBIVV.js +0 -2
  595. package/dist/bin/chunks/mkdir-XMSNS6S5.js +0 -7
  596. package/dist/bin/chunks/mv-P4KHB27X.js +0 -7
  597. package/dist/bin/chunks/od-KRKGC2U3.js +0 -5
  598. package/dist/bin/chunks/paste-UCH462KK.js +0 -8
  599. package/dist/bin/chunks/printf-4W7NDLLV.js +0 -15
  600. package/dist/bin/chunks/pwd-L26WH2K4.js +0 -3
  601. package/dist/bin/chunks/readlink-VL3R4LAM.js +0 -7
  602. package/dist/bin/chunks/rev-VP42N2JN.js +0 -7
  603. package/dist/bin/chunks/rm-S7ASVG34.js +0 -8
  604. package/dist/bin/chunks/seq-AVK43XM2.js +0 -7
  605. package/dist/bin/chunks/sha1sum-4SVNPPXZ.js +0 -2
  606. package/dist/bin/chunks/sha256sum-BM3AFTIE.js +0 -2
  607. package/dist/bin/chunks/sort-QF3YLXRW.js +0 -16
  608. package/dist/bin/chunks/split-7UP7EATZ.js +0 -16
  609. package/dist/bin/chunks/stat-ZZVPXHLF.js +0 -9
  610. package/dist/bin/chunks/strings-ZEKN6D4Q.js +0 -14
  611. package/dist/bin/chunks/tac-KNRFDAY7.js +0 -9
  612. package/dist/bin/chunks/tail-YAUIERGN.js +0 -2
  613. package/dist/bin/chunks/tee-XSKPK43X.js +0 -3
  614. package/dist/bin/chunks/timeout-JED4EKFH.js +0 -12
  615. package/dist/bin/chunks/touch-IBPHJBM3.js +0 -7
  616. package/dist/bin/chunks/tree-WC3AXFHC.js +0 -12
  617. package/dist/bin/chunks/true-OVATH2SQ.js +0 -2
  618. package/dist/bin/chunks/unexpand-BFVYAPOU.js +0 -11
  619. package/dist/bin/chunks/uniq-NNXAFO6D.js +0 -5
  620. package/dist/bin/chunks/wc-CZ2TD6T6.js +0 -6
  621. package/dist/bin/chunks/which-5QEJAXNR.js +0 -3
  622. package/dist/bin/chunks/whoami-JVLUNKSG.js +0 -3
  623. package/dist/bin/chunks/xargs-IWT2HHEA.js +0 -5
  624. package/dist/bin/shell/chunks/alias-MGDOL4KG.js +0 -7
  625. package/dist/bin/shell/chunks/awk2-OKD2P6CM.js +0 -21
  626. package/dist/bin/shell/chunks/base64-43KPK6TL.js +0 -6
  627. package/dist/bin/shell/chunks/basename-SO5MVUEX.js +0 -6
  628. package/dist/bin/shell/chunks/bash-OAUBNRSG.js +0 -6
  629. package/dist/bin/shell/chunks/cat-HNXE2ES2.js +0 -6
  630. package/dist/bin/shell/chunks/chmod-TYLTHXFR.js +0 -9
  631. package/dist/bin/shell/chunks/chunk-2ODUA7YH.js +0 -74
  632. package/dist/bin/shell/chunks/clear-CI7A5IXQ.js +0 -2
  633. package/dist/bin/shell/chunks/column-HQ4AK5DM.js +0 -8
  634. package/dist/bin/shell/chunks/comm-CPIFQTKY.js +0 -13
  635. package/dist/bin/shell/chunks/cp-VFXCUKXO.js +0 -8
  636. package/dist/bin/shell/chunks/cut-IHF6BEOO.js +0 -6
  637. package/dist/bin/shell/chunks/date-IQLPMFYI.js +0 -5
  638. package/dist/bin/shell/chunks/diff-ZGXLP3DN.js +0 -19
  639. package/dist/bin/shell/chunks/dirname-EES7TR26.js +0 -5
  640. package/dist/bin/shell/chunks/du-PECPOFQT.js +0 -8
  641. package/dist/bin/shell/chunks/echo-7I42V66Q.js +0 -4
  642. package/dist/bin/shell/chunks/env-W6IMQ43Y.js +0 -9
  643. package/dist/bin/shell/chunks/expand-77K5HH2M.js +0 -11
  644. package/dist/bin/shell/chunks/expr-433HIVAI.js +0 -5
  645. package/dist/bin/shell/chunks/find-KHOYETRP.js +0 -11
  646. package/dist/bin/shell/chunks/fold-452R4I2C.js +0 -12
  647. package/dist/bin/shell/chunks/grep-BD56656Z.js +0 -9
  648. package/dist/bin/shell/chunks/gzip-5ILPB46W.js +0 -32
  649. package/dist/bin/shell/chunks/head-TJHLLIMR.js +0 -2
  650. package/dist/bin/shell/chunks/help-L43ENI4H.js +0 -16
  651. package/dist/bin/shell/chunks/history-56DL6SXU.js +0 -3
  652. package/dist/bin/shell/chunks/hostname-WXDKRL2Z.js +0 -3
  653. package/dist/bin/shell/chunks/join-3IXMEGNA.js +0 -14
  654. package/dist/bin/shell/chunks/jq-EIPK4SZA.js +0 -13
  655. package/dist/bin/shell/chunks/ln-EFFNQ3RY.js +0 -10
  656. package/dist/bin/shell/chunks/ls-5LN47VHU.js +0 -26
  657. package/dist/bin/shell/chunks/md5sum-VHPDBIVV.js +0 -2
  658. package/dist/bin/shell/chunks/mkdir-XMSNS6S5.js +0 -7
  659. package/dist/bin/shell/chunks/mv-P4KHB27X.js +0 -7
  660. package/dist/bin/shell/chunks/od-KRKGC2U3.js +0 -5
  661. package/dist/bin/shell/chunks/paste-UCH462KK.js +0 -8
  662. package/dist/bin/shell/chunks/printf-4W7NDLLV.js +0 -15
  663. package/dist/bin/shell/chunks/pwd-L26WH2K4.js +0 -3
  664. package/dist/bin/shell/chunks/readlink-VL3R4LAM.js +0 -7
  665. package/dist/bin/shell/chunks/rev-VP42N2JN.js +0 -7
  666. package/dist/bin/shell/chunks/rm-S7ASVG34.js +0 -8
  667. package/dist/bin/shell/chunks/seq-AVK43XM2.js +0 -7
  668. package/dist/bin/shell/chunks/sha1sum-4SVNPPXZ.js +0 -2
  669. package/dist/bin/shell/chunks/sha256sum-BM3AFTIE.js +0 -2
  670. package/dist/bin/shell/chunks/sort-QF3YLXRW.js +0 -16
  671. package/dist/bin/shell/chunks/split-7UP7EATZ.js +0 -16
  672. package/dist/bin/shell/chunks/stat-ZZVPXHLF.js +0 -9
  673. package/dist/bin/shell/chunks/strings-ZEKN6D4Q.js +0 -14
  674. package/dist/bin/shell/chunks/tac-KNRFDAY7.js +0 -9
  675. package/dist/bin/shell/chunks/tail-YAUIERGN.js +0 -2
  676. package/dist/bin/shell/chunks/tee-XSKPK43X.js +0 -3
  677. package/dist/bin/shell/chunks/timeout-JED4EKFH.js +0 -12
  678. package/dist/bin/shell/chunks/touch-IBPHJBM3.js +0 -7
  679. package/dist/bin/shell/chunks/tree-WC3AXFHC.js +0 -12
  680. package/dist/bin/shell/chunks/true-OVATH2SQ.js +0 -2
  681. package/dist/bin/shell/chunks/unexpand-BFVYAPOU.js +0 -11
  682. package/dist/bin/shell/chunks/uniq-NNXAFO6D.js +0 -5
  683. package/dist/bin/shell/chunks/wc-CZ2TD6T6.js +0 -6
  684. package/dist/bin/shell/chunks/which-5QEJAXNR.js +0 -3
  685. package/dist/bin/shell/chunks/whoami-JVLUNKSG.js +0 -3
  686. package/dist/bin/shell/chunks/xargs-IWT2HHEA.js +0 -5
  687. package/dist/bundle/chunks/alias-YGOORMWI.js +0 -6
  688. package/dist/bundle/chunks/awk2-YNEKUV4T.js +0 -20
  689. package/dist/bundle/chunks/base64-2JFR3HGT.js +0 -5
  690. package/dist/bundle/chunks/basename-CFA5ZIGT.js +0 -5
  691. package/dist/bundle/chunks/bash-BYWM5OPC.js +0 -5
  692. package/dist/bundle/chunks/cat-GPKR7D6K.js +0 -5
  693. package/dist/bundle/chunks/chmod-ODWUR7E6.js +0 -8
  694. package/dist/bundle/chunks/chunk-2AON5K3E.js +0 -73
  695. package/dist/bundle/chunks/clear-VT2LJIDX.js +0 -1
  696. package/dist/bundle/chunks/column-R6OLMEUA.js +0 -7
  697. package/dist/bundle/chunks/comm-AXQM7FFF.js +0 -12
  698. package/dist/bundle/chunks/cp-NJSENVKC.js +0 -7
  699. package/dist/bundle/chunks/cut-NVKWEAZF.js +0 -5
  700. package/dist/bundle/chunks/date-PN3CMG7K.js +0 -4
  701. package/dist/bundle/chunks/diff-ELUS3RW7.js +0 -6
  702. package/dist/bundle/chunks/dirname-YPJLCQYA.js +0 -4
  703. package/dist/bundle/chunks/du-T4JUAAB2.js +0 -7
  704. package/dist/bundle/chunks/echo-6S7WE7XB.js +0 -3
  705. package/dist/bundle/chunks/env-M3AXY56V.js +0 -8
  706. package/dist/bundle/chunks/expand-VSTNOVF5.js +0 -10
  707. package/dist/bundle/chunks/expr-YSFDPKPV.js +0 -4
  708. package/dist/bundle/chunks/find-WTVSUXL3.js +0 -10
  709. package/dist/bundle/chunks/fold-6CFXIPYZ.js +0 -11
  710. package/dist/bundle/chunks/grep-UTH3KDWL.js +0 -8
  711. package/dist/bundle/chunks/gzip-4P4KGYT5.js +0 -31
  712. package/dist/bundle/chunks/head-SA7P5NJ7.js +0 -1
  713. package/dist/bundle/chunks/help-UD3E73G5.js +0 -15
  714. package/dist/bundle/chunks/history-TMBGOQO6.js +0 -2
  715. package/dist/bundle/chunks/hostname-NWR32CGF.js +0 -2
  716. package/dist/bundle/chunks/html-to-markdown-ZK6GQVSL.js +0 -4
  717. package/dist/bundle/chunks/join-X3QYPZUA.js +0 -13
  718. package/dist/bundle/chunks/jq-6U2TPE6U.js +0 -12
  719. package/dist/bundle/chunks/ln-Y7YB677N.js +0 -9
  720. package/dist/bundle/chunks/ls-PUJHEPXS.js +0 -23
  721. package/dist/bundle/chunks/md5sum-TGZPGVOK.js +0 -1
  722. package/dist/bundle/chunks/mkdir-SF2UE4KB.js +0 -6
  723. package/dist/bundle/chunks/mv-JPBZPM4O.js +0 -6
  724. package/dist/bundle/chunks/od-3FPDPLWJ.js +0 -4
  725. package/dist/bundle/chunks/paste-QAP6Y75J.js +0 -7
  726. package/dist/bundle/chunks/pwd-S4NVAMC4.js +0 -2
  727. package/dist/bundle/chunks/readlink-EM4O3U4P.js +0 -6
  728. package/dist/bundle/chunks/rev-FKUV5GH5.js +0 -6
  729. package/dist/bundle/chunks/rm-MJFRIDNT.js +0 -7
  730. package/dist/bundle/chunks/seq-5VRIVQYP.js +0 -6
  731. package/dist/bundle/chunks/sha1sum-37LOTSQP.js +0 -1
  732. package/dist/bundle/chunks/sha256sum-I4J5BPZA.js +0 -1
  733. package/dist/bundle/chunks/sleep-AK4QE4WR.js +0 -9
  734. package/dist/bundle/chunks/sort-LT2PE47K.js +0 -15
  735. package/dist/bundle/chunks/split-LGSGJHV5.js +0 -15
  736. package/dist/bundle/chunks/stat-IOLJTP7U.js +0 -8
  737. package/dist/bundle/chunks/strings-LRU5XCFP.js +0 -13
  738. package/dist/bundle/chunks/tac-2X4JLF4W.js +0 -8
  739. package/dist/bundle/chunks/tail-52LRAWXT.js +0 -1
  740. package/dist/bundle/chunks/tee-4KHTWVWB.js +0 -2
  741. package/dist/bundle/chunks/timeout-X3X3N6IE.js +0 -11
  742. package/dist/bundle/chunks/touch-TDTEBHHI.js +0 -6
  743. package/dist/bundle/chunks/tree-UFVZH4SS.js +0 -11
  744. package/dist/bundle/chunks/true-CNJ54NE6.js +0 -1
  745. package/dist/bundle/chunks/unexpand-I7A2VXFD.js +0 -10
  746. package/dist/bundle/chunks/uniq-XBP4SJA3.js +0 -4
  747. package/dist/bundle/chunks/wc-VDPK3LVS.js +0 -5
  748. package/dist/bundle/chunks/which-GF77XMJD.js +0 -2
  749. package/dist/bundle/chunks/whoami-YUDAIS32.js +0 -2
  750. package/dist/bundle/chunks/xargs-4FRA6OJ7.js +0 -4
@@ -1,7 +0,0 @@
1
- import{a as m}from"./chunk-HWKDQ44K.js";import{a as $}from"./chunk-44UOCSGV.js";import{a as g,b as y}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var D={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},E={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},R={name:"cp",async execute(f,e){if(y(f))return g(D);let t=m("cp",f,E);if(!t.ok)return t.error;let u=t.result.flags.recursive||t.result.flags.recursiveUpper,w=t.result.flags.noClobber,C=t.result.flags.preserve,P=t.result.flags.verbose,a=t.result.positional;if(a.length<2)return{stdout:"",stderr:`cp: missing destination file operand
2
- `,exitCode:1};let d=a.pop()??"",h=a,o=e.fs.resolvePath(e.cwd,d),v="",n="",l=0,p=!1;try{p=(await e.fs.stat(o)).isDirectory}catch{}if(h.length>1&&!p)return{stdout:"",stderr:`cp: target '${d}' is not a directory
3
- `,exitCode:1};for(let r of h)try{let i=e.fs.resolvePath(e.cwd,r),s=await e.fs.stat(i),c=o;if(p){let b=r.split("/").pop()||r;c=o==="/"?`/${b}`:`${o}/${b}`}if(s.isDirectory&&!u){n+=`cp: -r not specified; omitting directory '${r}'
4
- `,l=1;continue}if(w)try{await e.fs.stat(c);continue}catch{}await e.fs.cp(i,c,{recursive:u}),P&&(v+=`'${r}' -> '${c}'
5
- `)}catch(i){let s=$(i);s.includes("ENOENT")||s.includes("no such file")?n+=`cp: cannot stat '${r}': No such file or directory
6
- `:n+=`cp: cannot copy '${r}': ${s}
7
- `,l=1}return{stdout:v,stderr:n,exitCode:l}}};export{R as cpCommand};
@@ -1,5 +0,0 @@
1
- import{b as x}from"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import{a as y,b as I,c as m}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var W={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function k(t){let c=[],l=t.split(",");for(let n of l)if(n.includes("-")){let[s,r]=n.split("-");c.push({start:s?parseInt(s,10):1,end:r?parseInt(r,10):null})}else{let s=parseInt(n,10);c.push({start:s,end:s})}return c}function C(t,c){let l=[];for(let n of c){let s=n.start-1,r=n.end===null?t.length:n.end;for(let i=s;i<r&&i<t.length;i++)i>=0&&!l.includes(t[i])&&l.push(t[i])}return l}var E={name:"cut",async execute(t,c){if(I(t))return y(W);let l=" ",n=null,s=null,r=!1,i=[];for(let o=0;o<t.length;o++){let e=t[o];if(e==="-d")l=t[++o]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")n=t[++o];else if(e.startsWith("-f"))n=e.slice(2);else if(e==="-c")s=t[++o];else if(e.startsWith("-c"))s=e.slice(2);else if(e==="-s"||e==="--only-delimited")r=!0;else{if(e.startsWith("--"))return m("cut",e);if(e.startsWith("-")){let f=!1;for(let u of e.slice(1))if(u==="s")r=!0;else if(!"dfc".includes(u)){f=!0;break}if(f)return m("cut",e)}else i.push(e)}}if(!n&&!s)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
2
- `,exitCode:1};let p=await x(c,i,{cmdName:"cut"});if(!p.ok)return p.error;let a=p.content.split(`
3
- `);a.length>0&&a[a.length-1]===""&&a.pop();let g=k(n||s||"1"),h="";for(let o of a)if(s){let e=o.split(""),f=[];for(let u of g){let w=u.start-1,L=u.end===null?e.length:u.end;for(let d=w;d<L&&d<e.length;d++)d>=0&&f.push(e[d])}h+=`${f.join("")}
4
- `}else{if(r&&!o.includes(l))continue;let e=o.split(l),f=C(e,g);h+=`${f.join(l)}
5
- `}return{stdout:h,stderr:"",exitCode:0}}};export{E as cutCommand};
@@ -1,4 +0,0 @@
1
- import{a as g,b as k,c as m}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var p={name:"date",summary:"display the current time in the given FORMAT",usage:"date [OPTION]... [+FORMAT]",options:["-d, --date=STRING display time described by STRING","-u, --utc print Coordinated Universal Time (UTC)","-I, --iso-8601 output date/time in ISO 8601 format","-R, --rfc-email output RFC 5322 date format"," --help display this help and exit"]},M=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function n(t,i=2){return String(t).padStart(i,"0")}function T(t){let i=-t.getTimezoneOffset();return`${i>=0?"+":"-"}${n(Math.floor(Math.abs(i)/60))}${n(Math.abs(i)%60)}`}function d(t,i,r){let a=r?{Y:t.getUTCFullYear(),m:t.getUTCMonth(),D:t.getUTCDate(),H:t.getUTCHours(),M:t.getUTCMinutes(),S:t.getUTCSeconds(),w:t.getUTCDay()}:{Y:t.getFullYear(),m:t.getMonth(),D:t.getDate(),H:t.getHours(),M:t.getMinutes(),S:t.getSeconds(),w:t.getDay()},e="",o=0;for(;o<i.length;){if(i[o]==="%"&&o+1<i.length){let c=i[++o];switch(c){case"%":e+="%";break;case"a":e+=M[a.w];break;case"b":case"h":e+=h[a.m];break;case"d":e+=n(a.D);break;case"e":e+=String(a.D).padStart(2," ");break;case"F":e+=`${a.Y}-${n(a.m+1)}-${n(a.D)}`;break;case"H":e+=n(a.H);break;case"I":e+=n(a.H%12||12);break;case"m":e+=n(a.m+1);break;case"M":e+=n(a.M);break;case"n":e+=`
2
- `;break;case"p":e+=a.H<12?"AM":"PM";break;case"P":e+=a.H<12?"am":"pm";break;case"R":e+=`${n(a.H)}:${n(a.M)}`;break;case"s":e+=Math.floor(t.getTime()/1e3);break;case"S":e+=n(a.S);break;case"t":e+=" ";break;case"T":e+=`${n(a.H)}:${n(a.M)}:${n(a.S)}`;break;case"u":e+=a.w||7;break;case"w":e+=a.w;break;case"y":e+=n(a.Y%100);break;case"Y":e+=a.Y;break;case"z":e+=r?"+0000":T(t);break;case"Z":e+=r?"UTC":Intl.DateTimeFormat().resolvedOptions().timeZone;break;default:e+=`%${c}`}}else e+=i[o];o++}return e}function S(t){let i=new Date(t);if(!Number.isNaN(i.getTime()))return i;if(/^\d+$/.test(t))return new Date(Number.parseInt(t,10)*1e3);let r=t.toLowerCase();return r==="now"||r==="today"?new Date:r==="yesterday"?new Date(Date.now()-864e5):r==="tomorrow"?new Date(Date.now()+864e5):null}var w={name:"date",async execute(t,i){if(k(t))return g(p);let r=!1,a=null,e=null,o=!1,c=!1;for(let f=0;f<t.length;f++){let s=t[f];if(s==="-u"||s==="--utc")r=!0;else if(s==="-d"||s==="--date")a=t[++f]??"";else if(s.startsWith("--date="))a=s.slice(7);else if(s==="-I"||s==="--iso-8601")o=!0;else if(s==="-R"||s==="--rfc-email")c=!0;else if(s.startsWith("+"))e=s.slice(1);else{if(s.startsWith("--"))return m("date",s);if(s.startsWith("-"))for(let b of s.slice(1))if(b==="u")r=!0;else if(b==="I")o=!0;else if(b==="R")c=!0;else return m("date",`-${b}`)}}let l=a!==null?S(a):new Date;if(!l)return{stdout:"",stderr:`date: invalid date '${a}'
3
- `,exitCode:1};let u;return e?u=d(l,e,r):o?u=d(l,"%Y-%m-%dT%H:%M:%S%z",r):c?u=d(l,"%a, %d %b %Y %H:%M:%S %z",r):u=d(l,"%a %b %e %H:%M:%S %Z %Y",r),{stdout:`${u}
4
- `,stderr:"",exitCode:0}}};export{w as dateCommand};
@@ -1,6 +0,0 @@
1
- import{a as p}from"./chunk-HWKDQ44K.js";import{a as l,b as u}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";import*as c from"diff";var y={name:"diff",summary:"compare files line by line",usage:"diff [OPTION]... FILE1 FILE2",options:["-u, --unified output unified diff format (default)","-q, --brief report only whether files differ","-s, --report-identical-files report when files are the same","-i, --ignore-case ignore case differences"," --help display this help and exit"]},C={unified:{short:"u",long:"unified",type:"boolean"},brief:{short:"q",long:"brief",type:"boolean"},reportSame:{short:"s",long:"report-identical-files",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},$={name:"diff",async execute(d,e){if(u(d))return l(y);let t=p("diff",d,C);if(!t.ok)return t.error;let h=t.result.flags.brief,g=t.result.flags.reportSame,m=t.result.flags.ignoreCase,a=t.result.positional;if(t.result.flags.unified,a.length<2)return{stdout:"",stderr:`diff: missing operand
2
- `,exitCode:2};let o,s,[r,i]=a;try{o=r==="-"?e.stdin:await e.fs.readFile(e.fs.resolvePath(e.cwd,r))}catch{return{stdout:"",stderr:`diff: ${r}: No such file or directory
3
- `,exitCode:2}}try{s=i==="-"?e.stdin:await e.fs.readFile(e.fs.resolvePath(e.cwd,i))}catch{return{stdout:"",stderr:`diff: ${i}: No such file or directory
4
- `,exitCode:2}}let f=o,n=s;return m&&(f=f.toLowerCase(),n=n.toLowerCase()),f===n?g?{stdout:`Files ${r} and ${i} are identical
5
- `,stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0}:h?{stdout:`Files ${r} and ${i} differ
6
- `,stderr:"",exitCode:1}:{stdout:c.createTwoFilesPatch(r,i,o,s,"","",{context:3}),stderr:"",exitCode:1}}};export{$ as diffCommand};
@@ -1,4 +0,0 @@
1
- import{a as i,b as o}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var m={name:"dirname",summary:"strip last component from file name",usage:"dirname [OPTION] NAME...",options:[" --help display this help and exit"]},p={name:"dirname",async execute(t,l){if(o(t))return i(m);let a=t.filter(n=>!n.startsWith("-"));if(a.length===0)return{stdout:"",stderr:`dirname: missing operand
2
- `,exitCode:1};let e=[];for(let n of a){let r=n.replace(/\/+$/,""),s=r.lastIndexOf("/");s===-1?e.push("."):s===0?e.push("/"):e.push(r.slice(0,s))}return{stdout:`${e.join(`
3
- `)}
4
- `,stderr:"",exitCode:0}}};export{p as dirnameCommand};
@@ -1,7 +0,0 @@
1
- import"./chunk-NUFRM6SI.js";import{a as F}from"./chunk-HWKDQ44K.js";import{a as $,b as w}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var R={name:"du",summary:"estimate file space usage",usage:"du [OPTION]... [FILE]...",options:["-a write counts for all files, not just directories","-h print sizes in human readable format","-s display only a total for each argument","-c produce a grand total","--max-depth=N print total for directory only if N or fewer levels deep"," --help display this help and exit"]},x={allFiles:{short:"a",type:"boolean"},humanReadable:{short:"h",type:"boolean"},summarize:{short:"s",type:"boolean"},grandTotal:{short:"c",type:"boolean"},maxDepth:{long:"max-depth",type:"number"}},H={name:"du",async execute(a,s){if(w(a))return $(R);let n=F("du",a,x);if(!n.ok)return n.error;let r={allFiles:n.result.flags.allFiles,humanReadable:n.result.flags.humanReadable,summarize:n.result.flags.summarize,grandTotal:n.result.flags.grandTotal,maxDepth:n.result.flags.maxDepth??null},c=n.result.positional;c.length===0&&c.push(".");let o="",m="",h=0;for(let l of c){let z=s.fs.resolvePath(s.cwd,l);try{await s.fs.stat(z);let p=await b(s,z,l,r,0);o+=p.output,h+=p.totalSize,m+=p.stderr}catch{m+=`du: cannot access '${l}': No such file or directory
2
- `}}return r.grandTotal&&c.length>0&&(o+=`${D(h,r.humanReadable)} total
3
- `),{stdout:o,stderr:m,exitCode:m?1:0}}};async function b(a,s,n,r,c){let o={output:"",totalSize:0,stderr:""};try{let m=await a.fs.stat(s);if(!m.isDirectory)return o.totalSize=m.size,(r.allFiles||c===0)&&(o.output=D(m.size,r.humanReadable)+" "+n+`
4
- `),o;let h=0,l=[];if(a.fs.readdirWithFileTypes){let t=await a.fs.readdirWithFileTypes(s),i=t.filter(e=>e.isFile),f=t.filter(e=>e.isDirectory);for(let e=0;e<i.length;e+=100){let u=i.slice(e,e+100),g=await Promise.all(u.map(async d=>{let T=s==="/"?`/${d.name}`:`${s}/${d.name}`;try{let S=await a.fs.stat(T);return{name:d.name,isDirectory:!1,size:S.size}}catch{return{name:d.name,isDirectory:!1,size:0}}}));l.push(...g)}l.push(...f.map(e=>({name:e.name,isDirectory:!0})))}else{let t=await a.fs.readdir(s);for(let i=0;i<t.length;i+=100){let f=t.slice(i,i+100),e=await Promise.all(f.map(async u=>{let g=s==="/"?`/${u}`:`${s}/${u}`;try{let d=await a.fs.stat(g);return{name:u,isDirectory:d.isDirectory,size:d.isDirectory?void 0:d.size}}catch{return{name:u,isDirectory:!1,size:0}}}));l.push(...e)}}l.sort((t,i)=>t.name.localeCompare(i.name));let z=l.filter(t=>!t.isDirectory);for(let t of z){let i=t.size??0;if(h+=i,r.allFiles&&!r.summarize){let f=n==="."?t.name:`${n}/${t.name}`;o.output+=D(i,r.humanReadable)+" "+f+`
5
- `}}let p=l.filter(t=>t.isDirectory);for(let t=0;t<p.length;t+=100){let i=p.slice(t,t+100),f=await Promise.all(i.map(async e=>{let u=s==="/"?`/${e.name}`:`${s}/${e.name}`,g=n==="."?e.name:`${n}/${e.name}`;return{name:e.name,result:await b(a,u,g,r,c+1)}}));f.sort((e,u)=>e.name.localeCompare(u.name));for(let{result:e}of f)h+=e.totalSize,r.summarize||(r.maxDepth===null||c+1<=r.maxDepth)&&(o.output+=e.output)}o.totalSize=h,(r.summarize||r.maxDepth===null||c<=r.maxDepth)&&(o.output+=`${D(h,r.humanReadable)} ${n}
6
- `)}catch{o.stderr=`du: cannot read directory '${n}': Permission denied
7
- `}return o}function D(a,s){return s?a<1024?`${a}`:a<1024*1024?`${(a/1024).toFixed(1)}K`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}M`:`${(a/(1024*1024*1024)).toFixed(1)}G`:String(Math.ceil(a/1024)||1)}export{H as duCommand};
@@ -1,3 +0,0 @@
1
- import"./chunk-DXB73IDG.js";function c(a){let s="",e=0;for(;e<a.length;)if(a[e]==="\\"){if(e+1>=a.length){s+="\\";break}let o=a[e+1];switch(o){case"\\":s+="\\",e+=2;break;case"n":s+=`
2
- `,e+=2;break;case"t":s+=" ",e+=2;break;case"r":s+="\r",e+=2;break;case"a":s+="\x07",e+=2;break;case"b":s+="\b",e+=2;break;case"f":s+="\f",e+=2;break;case"v":s+="\v",e+=2;break;case"e":case"E":s+="\x1B",e+=2;break;case"c":return{output:s,stop:!0};case"0":{let r="",t=e+2;for(;t<a.length&&t<e+5&&/[0-7]/.test(a[t]);)r+=a[t],t++;if(r.length===0)s+="\0";else{let l=parseInt(r,8)%256;s+=String.fromCharCode(l)}e=t;break}case"x":{let r="",t=e+2;for(;t<a.length&&t<e+4&&/[0-9a-fA-F]/.test(a[t]);)r+=a[t],t++;if(r.length===0)s+="\\x",e+=2;else{let l=parseInt(r,16);s+=String.fromCharCode(l),e=t}break}case"u":{let r="",t=e+2;for(;t<a.length&&t<e+6&&/[0-9a-fA-F]/.test(a[t]);)r+=a[t],t++;if(r.length===0)s+="\\u",e+=2;else{let l=parseInt(r,16);s+=String.fromCodePoint(l),e=t}break}case"U":{let r="",t=e+2;for(;t<a.length&&t<e+10&&/[0-9a-fA-F]/.test(a[t]);)r+=a[t],t++;if(r.length===0)s+="\\U",e+=2;else{let l=parseInt(r,16);try{s+=String.fromCodePoint(l)}catch{s+=`\\U${r}`}e=t}break}default:s+=`\\${o}`,e+=2}}else s+=a[e],e++;return{output:s,stop:!1}}var n={name:"echo",async execute(a,s){let e=!1,o=s.xpgEcho??!1,r=0;for(;r<a.length;){let l=a[r];if(l==="-n")e=!0,r++;else if(l==="-e")o=!0,r++;else if(l==="-E")o=!1,r++;else if(l==="-ne"||l==="-en")e=!0,o=!0,r++;else break}let t=a.slice(r).join(" ");if(o){let l=c(t);if(t=l.output,l.stop)return{stdout:t,stderr:"",exitCode:0}}return e||(t+=`
3
- `),{stdout:t,stderr:"",exitCode:0}}};export{n as echoCommand};
@@ -1,8 +0,0 @@
1
- import{a as m,b as d,c as f}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var w={name:"env",summary:"run a program in a modified environment",usage:"env [OPTION]... [NAME=VALUE]... [COMMAND [ARG]...]",options:["-i, --ignore-environment start with an empty environment","-u NAME, --unset=NAME remove NAME from the environment"," --help display this help and exit"]},C={name:"env",async execute(o,l){if(d(o))return m(w);let a=!1,i=[],c=new Map,t=-1;for(let n=0;n<o.length;n++){let e=o[n];if(e==="-i"||e==="--ignore-environment")a=!0;else if(e==="-u"&&n+1<o.length)i.push(o[++n]);else if(e.startsWith("-u"))i.push(e.slice(2));else if(e.startsWith("--unset="))i.push(e.slice(8));else{if(e.startsWith("--")&&e!=="--")return f("env",e);if(e.startsWith("-")&&e!=="-"){for(let r of e.slice(1))if(r!=="i"&&r!=="u")return f("env",`-${r}`);e.includes("i")&&(a=!0)}else if(e.includes("=")&&t===-1){let r=e.indexOf("="),$=e.slice(0,r),g=e.slice(r+1);c.set($,g)}else{t=n;break}}}let s;if(a)s=new Map(c);else{s=new Map(l.env);for(let n of i)s.delete(n);for(let[n,e]of c)s.set(n,e)}if(t===-1){let n=[];for(let[e,r]of s)n.push(`${e}=${r}`);return{stdout:n.join(`
2
- `)+(n.length>0?`
3
- `:""),stderr:"",exitCode:0}}if(!l.exec)return{stdout:"",stderr:`env: command execution not supported in this context
4
- `,exitCode:1};let u=o.slice(t),h=u[0],x=u.slice(1).map(n=>/[\s"'\\$`!*?[\]{}|&;<>()]/.test(n)?`'${n.replace(/'/g,"'\\''")}'`:n),p=["command",h,...x].join(" "),v=Object.entries(c).map(([n,e])=>`${n}="${e}"`).join(" "),A=v?`${v} ${p}`:p;return l.exec(A,{cwd:l.cwd})}},y={name:"printenv",summary:"print all or part of environment",usage:"printenv [OPTION]... [VARIABLE]...",options:[" --help display this help and exit"]},E={name:"printenv",async execute(o,l){if(d(o))return m(y);let a=o.filter(t=>!t.startsWith("-"));if(a.length===0){let t=[];for(let[s,u]of l.env)t.push(`${s}=${u}`);return{stdout:t.join(`
5
- `)+(t.length>0?`
6
- `:""),stderr:"",exitCode:0}}let i=[],c=0;for(let t of a){let s=l.env.get(t);s!==void 0?i.push(s):c=1}return{stdout:i.join(`
7
- `)+(i.length>0?`
8
- `:""),stderr:"",exitCode:c}}};export{C as envCommand,E as printenvCommand};
@@ -1,10 +0,0 @@
1
- import{a as d,b as f,c}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var h={name:"expand",summary:"convert tabs to spaces",usage:"expand [OPTION]... [FILE]...",description:"Convert TABs in each FILE to spaces, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-i Only convert leading tabs on each line"],examples:["expand file.txt # Convert all tabs to 8 spaces","expand -t 4 file.txt # Use 4-space tabs","expand -t 4,8,12 file.txt # Custom tab stops"]};function p(n){let i=n.split(",").map(o=>o.trim()),t=[];for(let o of i){let e=parseInt(o,10);if(Number.isNaN(e)||e<1)return null;t.push(e)}for(let o=1;o<t.length;o++)if(t[o]<=t[o-1])return null;return t}function x(n,i){if(i.length===1){let t=i[0];return t-n%t}for(let t of i)if(t>n)return t-n;if(i.length>=2){let t=i[i.length-1]-i[i.length-2],o=i[i.length-1],e=Math.floor((n-o)/t)+1;return o+e*t-n}return 1}function b(n,i){let{tabStops:t,leadingOnly:o}=i,e="",r=0,s=!0;for(let a of n)if(a===" ")if(o&&!s)e+=a,r++;else{let l=x(r,t);e+=" ".repeat(l),r+=l}else a!==" "&&a!==" "&&(s=!1),e+=a,r++;return e}function u(n,i){if(n==="")return"";let t=n.split(`
2
- `),o=n.endsWith(`
3
- `)&&t[t.length-1]==="";return o&&t.pop(),t.map(r=>b(r,i)).join(`
4
- `)+(o?`
5
- `:"")}var m={name:"expand",execute:async(n,i)=>{if(f(n))return d(h);let t={tabStops:[8],leadingOnly:!1},o=[],e=0;for(;e<n.length;){let s=n[e];if(s==="-t"&&e+1<n.length){let a=p(n[e+1]);if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${n[e+1]}'
6
- `};t.tabStops=a,e+=2}else if(s.startsWith("-t")&&s.length>2){let a=p(s.slice(2));if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${s.slice(2)}'
7
- `};t.tabStops=a,e++}else if(s==="--tabs"&&e+1<n.length){let a=p(n[e+1]);if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${n[e+1]}'
8
- `};t.tabStops=a,e+=2}else if(s.startsWith("--tabs=")){let a=p(s.slice(7));if(!a)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${s.slice(7)}'
9
- `};t.tabStops=a,e++}else if(s==="-i"||s==="--initial")t.leadingOnly=!0,e++;else if(s==="--"){o.push(...n.slice(e+1));break}else{if(s.startsWith("-")&&s!=="-")return c("expand",s);o.push(s),e++}}let r="";if(o.length===0){let s=i.stdin??"";r=u(s,t)}else for(let s of o){let a=i.fs.resolvePath(i.cwd,s),l=await i.fs.readFile(a);if(l===null)return{exitCode:1,stdout:r,stderr:`expand: ${s}: No such file or directory
10
- `};r+=u(l,t)}return{exitCode:0,stdout:r,stderr:""}}};export{m as expand};
@@ -1,4 +0,0 @@
1
- import{a}from"./chunk-YNYSPYQ5.js";import"./chunk-DXB73IDG.js";var w={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
2
- `,exitCode:2};try{let c=d(s),h=c==="0"||c===""?1:0;return{stdout:`${c}
3
- `,stderr:"",exitCode:h}}catch(c){return{stdout:"",stderr:`expr: ${c.message}
4
- `,exitCode:2}}}};function d(s){if(s.length===1)return s[0];let r=0;function c(){let e=h();for(;r<s.length&&s[r]==="|";){r++;let t=h();if(e!=="0"&&e!=="")return e;e=t}return e}function h(){let e=m();for(;r<s.length&&s[r]==="&";){r++;let t=m();(e==="0"||e===""||t==="0"||t==="")&&(e="0")}return e}function m(){let e=N();for(;r<s.length;){let t=s[r];if(["=","!=","<",">","<=",">="].includes(t)){r++;let o=N(),n=parseInt(e,10),i=parseInt(o,10),f=!Number.isNaN(n)&&!Number.isNaN(i),l;t==="="?l=f?n===i:e===o:t==="!="?l=f?n!==i:e!==o:t==="<"?l=f?n<i:e<o:t===">"?l=f?n>i:e>o:t==="<="?l=f?n<=i:e<=o:l=f?n>=i:e>=o,e=l?"1":"0"}else break}return e}function N(){let e=p();for(;r<s.length;){let t=s[r];if(t==="+"||t==="-"){r++;let o=p(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");e=String(t==="+"?n+i:n-i)}else break}return e}function p(){let e=g();for(;r<s.length;){let t=s[r];if(t==="*"||t==="/"||t==="%"){r++;let o=g(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");if((t==="/"||t==="%")&&i===0)throw new Error("division by zero");t==="*"?e=String(n*i):t==="/"?e=String(Math.trunc(n/i)):e=String(n%i)}else break}return e}function g(){let e=u();for(;r<s.length&&s[r]===":";){r++;let t=u(),n=a(`^${t}`).match(e);n?e=n[1]!==void 0?n[1]:String(n[0].length):e="0"}return e}function u(){if(r>=s.length)throw new Error("syntax error");let e=s[r];if(e==="match"){r++;let t=u(),o=u(),i=a(o).match(t);return i?i[1]!==void 0?i[1]:String(i[0].length):"0"}if(e==="substr"){r++;let t=u(),o=parseInt(u(),10),n=parseInt(u(),10);if(Number.isNaN(o)||Number.isNaN(n))throw new Error("non-integer argument");return t.substring(o-1,o-1+n)}if(e==="index"){r++;let t=u(),o=u();for(let n=0;n<t.length;n++)if(o.includes(t[n]))return String(n+1);return"0"}if(e==="length"){r++;let t=u();return String(t.length)}if(e==="("){r++;let t=c();if(r>=s.length||s[r]!==")")throw new Error("syntax error");return r++,t}return r++,e}return c()}export{w as exprCommand};
@@ -1,10 +0,0 @@
1
- import{a as Z}from"./chunk-IJXFPKNC.js";import{a as te}from"./chunk-YNYSPYQ5.js";import{a as le,b as oe,c as ce}from"./chunk-EEXR5ZDP.js";import{a as ie,b as ae}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";function N(e,t){switch(e.type){case"name":{let n=e.pattern,r=n.match(/^\*(\.[a-zA-Z0-9]+)$/);if(r){let s=r[1],o=t.name;if(e.ignoreCase){if(!o.toLowerCase().endsWith(s.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!o.endsWith(s))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Z(t.name,n,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let n=e.pattern,r=t.relativePath,s=n.split("/");for(let a=0;a<s.length-1;a++){let i=s[a];if(i&&i!=="."&&i!==".."&&!i.includes("*")&&!i.includes("?")&&!i.includes("[")){let c=`/${i}/`;if(e.ignoreCase){if(!r.toLowerCase().includes(c.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.includes(c))return{matches:!1,pruned:!1,printed:!1}}}let o=n.match(/\*(\.[a-zA-Z0-9]+)$/);if(o){let a=o[1];if(e.ignoreCase){if(!r.toLowerCase().endsWith(a.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!r.endsWith(a))return{matches:!1,pruned:!1,printed:!1}}return{matches:Z(r,n,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let n=e.ignoreCase?"i":"";return{matches:te(e.pattern,n).test(t.relativePath),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:t.isFile,pruned:!1,printed:!1}:e.fileType==="d"?{matches:t.isDirectory,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"empty":return{matches:t.isEmpty,pruned:!1,printed:!1};case"mtime":{let r=(Date.now()-t.mtime)/(1e3*60*60*24),s;return e.comparison==="more"?s=r>e.days:e.comparison==="less"?s=r<e.days:s=Math.floor(r)===e.days,{matches:s,pruned:!1,printed:!1}}case"newer":{let n=t.newerRefTimes.get(e.refPath);return n===void 0?{matches:!1,pruned:!1,printed:!1}:{matches:t.mtime>n,pruned:!1,printed:!1}}case"size":{let n=e.value;switch(e.unit){case"c":n=e.value;break;case"k":n=e.value*1024;break;case"M":n=e.value*1024*1024;break;case"G":n=e.value*1024*1024*1024;break;case"b":n=e.value*512;break}let r;return e.comparison==="more"?r=t.size>n:e.comparison==="less"?r=t.size<n:e.unit==="b"?r=Math.ceil(t.size/512)===e.value:r=t.size===n,{matches:r,pruned:!1,printed:!1}}case"perm":{let n=t.mode&511,r=e.mode&511,s;return e.matchType==="exact"?s=n===r:e.matchType==="all"?s=(n&r)===r:s=(n&r)!==0,{matches:s,pruned:!1,printed:!1}}case"prune":return{matches:!0,pruned:!0,printed:!1};case"print":return{matches:!0,pruned:!1,printed:!0};case"not":{let n=N(e.expr,t);return{matches:!n.matches,pruned:n.pruned,printed:!1}}case"and":{let n=N(e.left,t);if(!n.matches)return{matches:!1,pruned:n.pruned,printed:!1};let r=N(e.right,t);return{matches:r.matches,pruned:n.pruned||r.pruned,printed:n.printed||r.printed}}case"or":{let n=N(e.left,t);if(n.matches)return n;let r=N(e.right,t);return{matches:r.matches,pruned:n.pruned||r.pruned,printed:r.printed}}}}function Y(e){if(!e)return!1;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!1;case"empty":case"mtime":case"newer":case"size":case"perm":return!0;case"not":return Y(e.expr);case"and":case"or":return Y(e.left)||Y(e.right)}}function _(e){if(!e)return!1;switch(e.type){case"empty":return!0;case"not":return _(e.expr);case"and":case"or":return _(e.left)||_(e.right);default:return!1}}function pe(e){let t={terminalDirName:null,requiredExtension:null};if(!e)return t;let n=Ee(e);if(be(e)&&n.length===1){let o=n[0].split("/").filter(a=>a.length>0);if(o.length>=2)for(let a=o.length-2;a>=0;a--){let i=o[a];if(!i.includes("*")&&!i.includes("?")&&!i.includes("[")&&i!=="."&&i!==".."){let c=o[a+1];if(c&&(c.includes("*")||c.includes("?"))){t.terminalDirName=i;let l=c.match(/^\*(\.[a-zA-Z0-9]+)$/);l&&(t.requiredExtension=l[1])}break}}}return t}function Ee(e){let t=[],n=r=>{r.type==="path"?t.push(r.pattern):r.type==="not"?n(r.expr):(r.type==="and"||r.type==="or")&&(n(r.left),n(r.right))};return n(e),t}function be(e){let t=n=>n.type==="type"&&n.fileType==="f"?!0:n.type==="not"?t(n.expr):n.type==="and"||n.type==="or"?t(n.left)||t(n.right):!1;return t(e)}function fe(e){let t=[],n=r=>{r&&(r.type==="newer"?t.push(r.refPath):r.type==="not"?n(r.expr):(r.type==="and"||r.type==="or")&&(n(r.left),n(r.right)))};return n(e),t}function V(e){if(!e)return!0;switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!0;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return V(e.expr);case"and":case"or":return V(e.left)&&V(e.right)}}function O(e,t,n,r,s){switch(e.type){case"name":{let o=e.pattern,a=o.match(/^\*(\.[a-zA-Z0-9]+)$/);if(a){let i=a[1];if(e.ignoreCase){if(!t.toLowerCase().endsWith(i.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!t.endsWith(i))return{matches:!1,pruned:!1,printed:!1};return{matches:!0,pruned:!1,printed:!1}}return{matches:Z(t,o,e.ignoreCase),pruned:!1,printed:!1}}case"path":{let o=e.pattern,a=o.split("/");for(let c=0;c<a.length-1;c++){let l=a[c];if(l&&l!=="."&&l!==".."&&!l.includes("*")&&!l.includes("?")&&!l.includes("[")){let d=`/${l}/`;if(e.ignoreCase){if(!n.toLowerCase().includes(d.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.includes(d))return{matches:!1,pruned:!1,printed:!1}}}let i=o.match(/\*(\.[a-zA-Z0-9]+)$/);if(i){let c=i[1];if(e.ignoreCase){if(!n.toLowerCase().endsWith(c.toLowerCase()))return{matches:!1,pruned:!1,printed:!1}}else if(!n.endsWith(c))return{matches:!1,pruned:!1,printed:!1}}return{matches:Z(n,o,e.ignoreCase),pruned:!1,printed:!1}}case"regex":try{let o=e.ignoreCase?"i":"";return{matches:te(e.pattern,o).test(n),pruned:!1,printed:!1}}catch{return{matches:!1,pruned:!1,printed:!1}}case"type":return e.fileType==="f"?{matches:r,pruned:!1,printed:!1}:e.fileType==="d"?{matches:s,pruned:!1,printed:!1}:{matches:!1,pruned:!1,printed:!1};case"prune":return{matches:!0,pruned:!0,printed:!1};case"print":return{matches:!0,pruned:!1,printed:!0};case"not":{let o=O(e.expr,t,n,r,s);return{matches:!o.matches,pruned:o.pruned,printed:!1}}case"and":{let o=O(e.left,t,n,r,s);if(!o.matches)return{matches:!1,pruned:o.pruned,printed:!1};let a=O(e.right,t,n,r,s);return{matches:a.matches,pruned:o.pruned||a.pruned,printed:o.printed||a.printed}}case"or":{let o=O(e.left,t,n,r,s);if(o.matches)return o;let a=O(e.right,t,n,r,s);return{matches:a.matches,pruned:o.pruned||a.pruned,printed:a.printed}}default:return{matches:!1,pruned:!1,printed:!1}}}function J(e){if(!e)return!1;switch(e.type){case"prune":return!0;case"not":return J(e.expr);case"and":case"or":return J(e.left)||J(e.right);default:return!1}}function z(e){switch(e.type){case"name":case"path":case"regex":case"type":case"prune":case"print":return!0;case"empty":case"mtime":case"newer":case"size":case"perm":return!1;case"not":return z(e.expr);case"and":case"or":return z(e.left)&&z(e.right)}}function ue(e,t){if(!e||!t.isDirectory)return{shouldPrune:!1};if(!z(e))return ne(e,t);let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:N(e,n).pruned}}function ne(e,t){switch(e.type){case"or":{if(z(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};if(N(e.left,n).pruned)return{shouldPrune:!0}}return ne(e.right,t)}case"and":{if(z(e.left)&&z(e.right)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return{shouldPrune:N(e,n).pruned}}if(z(e.left)){let n={name:t.name,relativePath:t.relativePath,isFile:t.isFile,isDirectory:t.isDirectory,isEmpty:!1,mtime:0,size:0,mode:0,newerRefTimes:new Map};return N(e.left,n).matches?ne(e.right,t):{shouldPrune:!1}}return{shouldPrune:!1}}case"not":return{shouldPrune:!1};default:return{shouldPrune:!1}}}function he(e,t){let n=[],r=[],s=t;for(;s<e.length;){let a=e[s];if(a==="("||a==="\\("){n.push({type:"lparen"}),s++;continue}if(a===")"||a==="\\)"){n.push({type:"rparen"}),s++;continue}if(a==="-name"&&s+1<e.length)n.push({type:"expr",expr:{type:"name",pattern:e[++s]}});else if(a==="-iname"&&s+1<e.length)n.push({type:"expr",expr:{type:"name",pattern:e[++s],ignoreCase:!0}});else if(a==="-path"&&s+1<e.length)n.push({type:"expr",expr:{type:"path",pattern:e[++s]}});else if(a==="-ipath"&&s+1<e.length)n.push({type:"expr",expr:{type:"path",pattern:e[++s],ignoreCase:!0}});else if(a==="-regex"&&s+1<e.length)n.push({type:"expr",expr:{type:"regex",pattern:e[++s]}});else if(a==="-iregex"&&s+1<e.length)n.push({type:"expr",expr:{type:"regex",pattern:e[++s],ignoreCase:!0}});else if(a==="-type"&&s+1<e.length){let i=e[++s];if(i==="f"||i==="d")n.push({type:"expr",expr:{type:"type",fileType:i}});else return{expr:null,pathIndex:s,error:`find: Unknown argument to -type: ${i}
2
- `,actions:[]}}else if(a==="-empty")n.push({type:"expr",expr:{type:"empty"}});else if(a==="-mtime"&&s+1<e.length){let i=e[++s],c="exact",l=i;i.startsWith("+")?(c="more",l=i.slice(1)):i.startsWith("-")&&(c="less",l=i.slice(1));let d=parseInt(l,10);Number.isNaN(d)||n.push({type:"expr",expr:{type:"mtime",days:d,comparison:c}})}else if(a==="-newer"&&s+1<e.length){let i=e[++s];n.push({type:"expr",expr:{type:"newer",refPath:i}})}else if(a==="-size"&&s+1<e.length){let i=e[++s],c="exact",l=i;i.startsWith("+")?(c="more",l=i.slice(1)):i.startsWith("-")&&(c="less",l=i.slice(1));let d=l.match(/^(\d+)([ckMGb])?$/);if(d){let B=parseInt(d[1],10),F=d[2]||"b";n.push({type:"expr",expr:{type:"size",value:B,unit:F,comparison:c}})}}else if(a==="-perm"&&s+1<e.length){let i=e[++s],c="exact",l=i;i.startsWith("-")?(c="all",l=i.slice(1)):i.startsWith("/")&&(c="any",l=i.slice(1));let d=parseInt(l,8);Number.isNaN(d)||n.push({type:"expr",expr:{type:"perm",mode:d,matchType:c}})}else if(a==="-prune")n.push({type:"expr",expr:{type:"prune"}});else if(a==="-not"||a==="!")n.push({type:"not"});else if(a==="-o"||a==="-or")n.push({type:"op",op:"or"});else if(a==="-a"||a==="-and")n.push({type:"op",op:"and"});else if(a==="-maxdepth"||a==="-mindepth")s++;else if(a!=="-depth")if(a==="-exec"){let i=[];for(s++;s<e.length&&e[s]!==";"&&e[s]!=="+";)i.push(e[s]),s++;if(s>=e.length)return{expr:null,pathIndex:s,error:"find: missing argument to `-exec'\n",actions:[]};let c=e[s]==="+";r.push({type:"exec",command:i,batchMode:c})}else if(a==="-print")n.push({type:"expr",expr:{type:"print"}}),r.push({type:"print"});else if(a==="-print0")r.push({type:"print0"});else if(a==="-printf"&&s+1<e.length){let i=e[++s];r.push({type:"printf",format:i})}else if(a==="-delete")r.push({type:"delete"});else{if(a.startsWith("-"))return{expr:null,pathIndex:s,error:`find: unknown predicate '${a}'
3
- `,actions:[]};if(n.length===0){s++;continue}break}s++}if(n.length===0)return{expr:null,pathIndex:s,actions:r};let o=Me(n);return o.error?{expr:null,pathIndex:s,error:o.error,actions:r}:{expr:o.expr,pathIndex:s,actions:r}}function Me(e){let t=0;function n(){let i=r();if(!i)return null;for(;t<e.length;){let c=e[t];if(c.type==="op"&&c.op==="or"){t++;let l=r();if(!l)return i;i={type:"or",left:i,right:l}}else break}return i}function r(){let i=s();if(!i)return null;for(;t<e.length;){let c=e[t];if(c.type==="op"&&c.op==="and"){t++;let l=s();if(!l)return i;i={type:"and",left:i,right:l}}else if(c.type==="expr"||c.type==="not"||c.type==="lparen"){let l=s();if(!l)return i;i={type:"and",left:i,right:l}}else break}return i}function s(){if(t<e.length&&e[t].type==="not"){t++;let i=s();return i?{type:"not",expr:i}:null}return o()}function o(){if(t>=e.length)return null;let i=e[t];if(i.type==="lparen"){t++;let c=n();return t<e.length&&e[t].type==="rparen"&&t++,c}return i.type==="expr"?(t++,i.expr):(i.type==="rparen",null)}return{expr:n()}}var de=500;function ve(){return{readdirCalls:0,readdirTime:0,statCalls:0,statTime:0,evalCalls:0,evalTime:0,nodeCount:0,batchCount:0,batchTime:0,earlyPrunes:0}}function xe(e,t,n){e({category:"find",name:"summary",durationMs:n,details:{readdirCalls:t.readdirCalls,readdirTimeMs:t.readdirTime,statCalls:t.statCalls,statTimeMs:t.statTime,evalCalls:t.evalCalls,evalTimeMs:t.evalTime,nodeCount:t.nodeCount,batchCount:t.batchCount,batchTimeMs:t.batchTime,earlyPrunes:t.earlyPrunes,otherTimeMs:n-t.readdirTime-t.statTime-t.evalTime-t.batchTime}})}var Ie={name:"find",summary:"search for files in a directory hierarchy",usage:"find [path...] [expression]",options:["-name PATTERN file name matches shell pattern PATTERN","-iname PATTERN like -name but case insensitive","-path PATTERN file path matches shell pattern PATTERN","-ipath PATTERN like -path but case insensitive","-regex PATTERN file path matches regular expression PATTERN","-iregex PATTERN like -regex but case insensitive","-type TYPE file is of type: f (regular file), d (directory)","-empty file is empty or directory is empty","-mtime N file's data was modified N*24 hours ago","-newer FILE file was modified more recently than FILE","-size N[ckMGb] file uses N units of space (c=bytes, k=KB, M=MB, G=GB, b=512B blocks)","-perm MODE file's permission bits are exactly MODE (octal)","-perm -MODE all permission bits MODE are set","-perm /MODE any permission bits MODE are set","-maxdepth LEVELS descend at most LEVELS directories","-mindepth LEVELS do not apply tests at levels less than LEVELS","-depth process directory contents before directory itself","-prune do not descend into this directory","-not, ! negate the following expression","-a, -and logical AND (default)","-o, -or logical OR","-exec CMD {} ; execute CMD on each file ({} is replaced by filename)","-exec CMD {} + execute CMD with multiple files at once","-print print the full file name (default action)","-print0 print the full file name followed by a null character","-printf FORMAT print FORMAT with directives: %f %h %p %P %s %d %m %M %t","-delete delete found files/directories"," --help display this help and exit"]},Fe=new Set(["-name","-iname","-path","-ipath","-regex","-iregex","-type","-maxdepth","-mindepth","-mtime","-newer","-size","-perm"]),je={name:"find",async execute(e,t){if(ae(e))return ie(Ie);let n=[],r=null,s=null,o=!1,a=!1;for(let p=0;p<e.length;p++){let f=e[p];if(f==="-maxdepth"&&p+1<e.length)a=!0,r=parseInt(e[++p],10);else if(f==="-mindepth"&&p+1<e.length)a=!0,s=parseInt(e[++p],10);else if(f==="-depth")a=!0,o=!0;else if(f==="-exec")for(a=!0,p++;p<e.length&&e[p]!==";"&&e[p]!=="+";)p++;else!f.startsWith("-")&&f!==";"&&f!=="+"&&f!=="("&&f!==")"&&f!=="\\("&&f!=="\\)"&&f!=="!"?a||n.push(f):Fe.has(f)?(a=!0,p++):(f.startsWith("-")||f==="("||f==="\\("||f==="!")&&(a=!0)}n.length===0&&n.push(".");let{expr:i,error:c,actions:l}=he(e,0);if(c)return{stdout:"",stderr:c,exitCode:1};let d=l.some(p=>p.type==="print"),B=l.length===0,F=[],me=l.some(p=>p.type==="printf"),se=[],q="",G=0,ye=fe(i),U=new Map;for(let p of ye){let f=t.fs.resolvePath(t.cwd,p);try{let h=await t.fs.stat(f);U.set(p,h.mtime?.getTime()??Date.now())}catch{}}let ge=l.some(p=>{if(p.type!=="printf")return!1;let f=p.format.replace(/%%/g,"");return/%[-+]?[0-9]*\.?[0-9]*(s|m|M|t|T)/.test(f)}),we=Y(i)||ge,De=_(i),K=pe(i),re=J(i),Te=V(i),Ce=typeof t.fs.readdirWithFileTypes=="function";for(let p of n){let W=function(u){let R=s===null||u.depth>=s,P=!1;if(R&&i!==null){let S=Date.now(),y;if(Te)y=O(i,u.name,u.relativePath,u.isFile,u.isDirectory);else{let m={name:u.name,relativePath:u.relativePath,isFile:u.isFile,isDirectory:u.isDirectory,isEmpty:u.isEmpty,mtime:u.stat?.mtime?.getTime()??Date.now(),size:u.stat?.size??0,mode:u.stat?.mode??420,newerRefTimes:U};y=N(i,m)}R=y.matches,P=d?y.printed:R,h.evalCalls++,h.evalTime+=Date.now()-S}else R&&(P=!0);return P?{print:!0,printfData:me?{path:u.relativePath,name:u.name,size:u.stat?.size??0,mtime:u.stat?.mtime?.getTime()??Date.now(),mode:u.stat?.mode??420,isDirectory:u.isDirectory,depth:u.depth,startingPoint:p}:null}:{print:!1,printfData:null}};var We=W;p.length>1&&p.endsWith("/")&&(p=p.slice(0,-1));let f=t.fs.resolvePath(t.cwd,p);try{await t.fs.stat(f)}catch{q+=`find: ${p}: No such file or directory
4
- `,G=1;continue}let h=ve(),$=Date.now();async function E(u){let{path:b,depth:R,typeInfo:P}=u;if(h.nodeCount++,r!==null&&R>r)return null;let M,S,y;if(P&&!we)M=P.isFile,S=P.isDirectory;else{try{let L=Date.now();y=await t.fs.stat(b),h.statCalls++,h.statTime+=Date.now()-L}catch{return null}if(!y)return null;M=y.isFile,S=y.isDirectory}let m;b===f?m=p.split("/").pop()||p:m=b.split("/").pop()||"";let g=b===f?p:p==="."?`./${b.slice(f==="/"?f.length:f.length+1)}`:p+b.slice(f.length),T=[],C=null,w=null,D=!1;S&&re&&!o&&(D=ue(i,{name:m,relativePath:g,isFile:M,isDirectory:S}).shouldPrune,D&&h.earlyPrunes++);let x=r!==null&&R>=r,I=K.terminalDirName!==null&&m===K.terminalDirName,j=!x&&!I&&!D;if(S&&((j||De||I)&&!D)){let L=Date.now();if(Ce&&t.fs.readdirWithFileTypes){if(C=await t.fs.readdirWithFileTypes(b),w=C.map(v=>v.name),h.readdirCalls++,h.readdirTime+=Date.now()-L,j)T=C.map((v,k)=>({path:b==="/"?`/${v.name}`:`${b}/${v.name}`,depth:R+1,typeInfo:{isFile:v.isFile,isDirectory:v.isDirectory},resultIndex:k}));else if(I){let v=K.requiredExtension;T=C.filter(k=>k.isFile&&(!v||k.name.endsWith(v))).map((k,Se)=>({path:b==="/"?`/${k.name}`:`${b}/${k.name}`,depth:R+1,typeInfo:{isFile:k.isFile,isDirectory:k.isDirectory},resultIndex:Se}))}}else w=await t.fs.readdir(b),h.readdirCalls++,h.readdirTime+=Date.now()-L,j&&(T=w.map((v,k)=>({path:b==="/"?`/${v}`:`${b}/${v}`,depth:R+1,resultIndex:k})))}let Q=M?(y?.size??0)===0:w!==null&&w.length===0,H=D;if(!o&&i!==null&&!D&&re){let L=Date.now(),v={name:m,relativePath:g,isFile:M,isDirectory:S,isEmpty:Q,mtime:y?.mtime?.getTime()??Date.now(),size:y?.size??0,mode:y?.mode??420,newerRefTimes:U};H=N(i,v).pruned,h.evalCalls++,h.evalTime+=Date.now()-L}return{relativePath:g,name:m,isFile:M,isDirectory:S,isEmpty:Q,stat:y,depth:R,children:H?[]:T,pruned:H}}async function Pe(){let u={paths:[],printfData:[]};if(o){let y=function(m){let g={paths:[],printfData:[]},T=P[m];if(!T)return g;for(let D of T.childIndices){let x=y(D);g.paths.push(...x.paths),g.printfData.push(...x.printfData)}let{print:C,printfData:w}=W(T.node);return C&&(g.paths.push(T.node.relativePath),w&&g.printfData.push(w)),g};var b=y;let P=[],M=[{item:{path:f,depth:0,resultIndex:0},parentIndex:-1,childOrderInParent:0}],S=new Map;for(;M.length>0;){let m=Date.now(),g=M.splice(0,de),T=await Promise.all(g.map(C=>E(C.item)));h.batchCount++,h.batchTime+=Date.now()-m;for(let C=0;C<g.length;C++){let w=T[C],D=g[C];if(!w)continue;let x=P.length;if(D.parentIndex>=0){let I=S.get(D.parentIndex)||[];I.push(x),S.set(D.parentIndex,I)}P.push({node:w,parentIndex:D.parentIndex,childIndices:[]});for(let I=0;I<w.children.length;I++)M.push({item:w.children[I],parentIndex:x,childOrderInParent:I})}}for(let[m,g]of S)m>=0&&m<P.length&&(P[m].childIndices=g);if(P.length>0){let m=y(0);u.paths.push(...m.paths),u.printfData.push(...m.printfData)}}else{let m=function(g){let T=P.get(g);T&&(u.paths.push(T.path),T.printfData&&u.printfData.push(T.printfData));let C=y.get(g);if(C)for(let w of C)m(w)};var R=m;let P=new Map,M=0,S=[{item:{path:f,depth:0,resultIndex:0},orderIndex:M++}],y=new Map;for(;S.length>0;){let g=Date.now(),T=S.splice(0,de),C=await Promise.all(T.map(async({item:w,orderIndex:D})=>{let x=await E(w);return x?{node:x,orderIndex:D}:null}));h.batchCount++,h.batchTime+=Date.now()-g;for(let w of C){if(!w)continue;let{node:D,orderIndex:x}=w,{print:I,printfData:j}=W(D);if(I&&P.set(x,{path:D.relativePath,printfData:j}),D.children.length>0){let ee=[];for(let Q of D.children){let H=M++;ee.push(H),S.push({item:Q,orderIndex:H})}y.set(x,ee)}}}m(0)}return u}let X=await Pe();if(F.push(...X.paths),se.push(...X.printfData),t.trace){let u=Date.now()-$;xe(t.trace,h,u),t.trace({category:"find",name:"searchPath",durationMs:u,details:{path:p,resultsFound:X.paths.length}})}}let A="";if(l.length>0)for(let p of l)switch(p.type){case"print":A+=F.length>0?`${F.join(`
5
- `)}
6
- `:"";break;case"print0":A+=F.length>0?`${F.join("\0")}\0`:"";break;case"delete":{let f=[...F].sort((h,$)=>$.length-h.length);for(let h of f){let $=t.fs.resolvePath(t.cwd,h);try{await t.fs.rm($,{recursive:!1})}catch(E){let W=E instanceof Error?E.message:String(E);q+=`find: cannot delete '${h}': ${W}
7
- `,G=1}}break}case"printf":for(let f of se)A+=$e(p.format,f);break;case"exec":if(!t.exec)return{stdout:"",stderr:`find: -exec not supported in this context
8
- `,exitCode:1};if(p.batchMode){let f=[];for(let E of p.command)E==="{}"?f.push(...F):f.push(E);let h=f.map(E=>`"${E}"`).join(" "),$=await t.exec(h,{cwd:t.cwd});A+=$.stdout,q+=$.stderr,$.exitCode!==0&&(G=$.exitCode)}else for(let f of F){let $=p.command.map(W=>W==="{}"?f:W).map(W=>`"${W}"`).join(" "),E=await t.exec($,{cwd:t.cwd});A+=E.stdout,q+=E.stderr,E.exitCode!==0&&(G=E.exitCode)}break}else B&&(A=F.length>0?`${F.join(`
9
- `)}
10
- `:"");return{stdout:A,stderr:q,exitCode:G}}};function $e(e,t){let n=ce(e),r="",s=0;for(;s<n.length;)if(n[s]==="%"&&s+1<n.length){if(s++,n[s]==="%"){r+="%",s++;continue}let[o,a,i]=oe(n,s);if(s+=i,s>=n.length){r+="%";break}let c=n[s],l;switch(c){case"f":l=t.name,s++;break;case"h":{let d=t.path.lastIndexOf("/");l=d>0?t.path.slice(0,d):".",s++;break}case"p":l=t.path,s++;break;case"P":{let d=t.startingPoint;t.path===d?l="":t.path.startsWith(`${d}/`)?l=t.path.slice(d.length+1):d==="."&&t.path.startsWith("./")?l=t.path.slice(2):l=t.path,s++;break}case"s":l=String(t.size),s++;break;case"d":l=String(t.depth),s++;break;case"m":l=(t.mode&511).toString(8),s++;break;case"M":l=Re(t.mode,t.isDirectory),s++;break;case"t":{let d=new Date(t.mtime);l=ke(d),s++;break}case"T":{if(s+1<n.length){let d=n[s+1],B=new Date(t.mtime);l=Ne(B,d),s+=2}else l="%T",s++;break}default:r+=`%${o!==0||a!==-1?`${o}.${a}`:""}${c}`,s++;continue}r+=le(l,o,a)}else r+=n[s],s++;return r}function Re(e,t){let n=e&511,r=t?"d":"-";return r+=n&256?"r":"-",r+=n&128?"w":"-",r+=n&64?"x":"-",r+=n&32?"r":"-",r+=n&16?"w":"-",r+=n&8?"x":"-",r+=n&4?"r":"-",r+=n&2?"w":"-",r+=n&1?"x":"-",r}function ke(e){let t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],r=t[e.getDay()],s=n[e.getMonth()],o=String(e.getDate()).padStart(2," "),a=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),c=String(e.getSeconds()).padStart(2,"0"),l=e.getFullYear();return`${r} ${s} ${o} ${a}:${i}:${c} ${l}`}function Ne(e,t){switch(t){case"@":return String(e.getTime()/1e3);case"Y":return String(e.getFullYear());case"m":return String(e.getMonth()+1).padStart(2,"0");case"d":return String(e.getDate()).padStart(2,"0");case"H":return String(e.getHours()).padStart(2,"0");case"M":return String(e.getMinutes()).padStart(2,"0");case"S":return String(e.getSeconds()).padStart(2,"0");case"T":return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`;case"F":return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;default:return`%T${t}`}}export{je as findCommand};
@@ -1,11 +0,0 @@
1
- import{a as h,b as p,c as w}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var m={name:"fold",summary:"wrap each input line to fit in specified width",usage:"fold [OPTION]... [FILE]...",description:"Wrap input lines in each FILE, writing to standard output. If no FILE is specified, standard input is read.",options:["-w WIDTH Use WIDTH columns instead of 80","-s Break at spaces","-b Count bytes rather than columns"],examples:["fold -w 40 file.txt # Wrap at 40 columns","fold -sw 40 file.txt # Word wrap at 40 columns","echo 'long line' | fold -w 5 # Force wrap at 5"]};function N(s,l,n){return n?new TextEncoder().encode(s).length:s===" "?8-l%8:s==="\b"?-1:1}function g(s,l){if(s.length===0)return s;let{width:n,breakAtSpaces:u,countBytes:i}=l,r=[],e="",t=0,o=-1,f=0;for(let a=0;a<s.length;a++){let d=s[a],c=N(d,t,i);t+c>n&&e.length>0?u&&o>=0?(r.push(e.slice(0,o+1)),e=e.slice(o+1)+d,t=t-f-1+c,o=-1,f=0):(r.push(e),e=d,t=c,o=-1,f=0):(e+=d,t+=c,(d===" "||d===" ")&&(o=e.length-1,f=t-c))}return e.length>0&&r.push(e),r.join(`
2
- `)}function b(s,l){if(s==="")return"";let n=s.split(`
3
- `),u=s.endsWith(`
4
- `)&&n[n.length-1]==="";return u&&n.pop(),n.map(r=>g(r,l)).join(`
5
- `)+(u?`
6
- `:"")}var I={name:"fold",execute:async(s,l)=>{if(p(s))return h(m);let n={width:80,breakAtSpaces:!1,countBytes:!1},u=[],i=0;for(;i<s.length;){let e=s[i];if(e==="-w"&&i+1<s.length){let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
7
- `};n.width=t,i+=2}else if(e.startsWith("-w")&&e.length>2){let t=parseInt(e.slice(2),10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${e.slice(2)}'
8
- `};n.width=t,i++}else if(e==="-s")n.breakAtSpaces=!0,i++;else if(e==="-b")n.countBytes=!0,i++;else if(e==="-bs"||e==="-sb")n.breakAtSpaces=!0,n.countBytes=!0,i++;else if(e.match(/^-[sb]+w\d+$/)){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=e.replace(/^-[sb]+w/,""),o=parseInt(t,10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${t}'
9
- `};n.width=o,i++}else if(e.match(/^-[sb]+w$/)&&i+1<s.length){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
10
- `};n.width=t,i+=2}else if(e==="--"){u.push(...s.slice(i+1));break}else if(e.startsWith("-")&&e!=="-"){let t=e.slice(1),o=!1;for(let f of t)if(f==="s")n.breakAtSpaces=!0;else if(f==="b")n.countBytes=!0;else{o=!0;break}if(o)return w("fold",e);i++}else u.push(e),i++}let r="";if(u.length===0){let e=l.stdin??"";r=b(e,n)}else for(let e of u){let t=l.fs.resolvePath(l.cwd,e),o=await l.fs.readFile(t);if(o===null)return{exitCode:1,stdout:r,stderr:`fold: ${e}: No such file or directory
11
- `};r+=b(o,n)}return{exitCode:0,stdout:r,stderr:""}}};export{I as fold};
@@ -1,8 +0,0 @@
1
- import{a as y}from"./chunk-IJXFPKNC.js";import{a as S,b as z}from"./chunk-VLGZJRPG.js";import"./chunk-YNYSPYQ5.js";import{a as _,b as j,c as G}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var te={name:"grep",summary:"print lines that match patterns",usage:"grep [OPTION]... PATTERN [FILE]...",options:["-E, --extended-regexp PATTERN is an extended regular expression","-P, --perl-regexp PATTERN is a Perl regular expression","-F, --fixed-strings PATTERN is a set of newline-separated strings","-i, --ignore-case ignore case distinctions","-v, --invert-match select non-matching lines","-w, --word-regexp match only whole words","-x, --line-regexp match only whole lines","-c, --count print only a count of matching lines","-l, --files-with-matches print only names of files with matches","-L, --files-without-match print names of files with no matches","-m NUM, --max-count=NUM stop after NUM matches","-n, --line-number print line number with output lines","-h, --no-filename suppress the file name prefix on output","-o, --only-matching show only nonempty parts of lines that match","-q, --quiet, --silent suppress all normal output","-r, -R, --recursive search directories recursively","-A NUM print NUM lines of trailing context","-B NUM print NUM lines of leading context","-C NUM print NUM lines of context","-e PATTERN use PATTERN for matching"," --include=GLOB search only files matching GLOB"," --exclude=GLOB skip files matching GLOB"," --exclude-dir=DIR skip directories matching DIR"," --help display this help and exit"]},J={name:"grep",async execute(t,s){if(j(t))return _(te);let o=!1,f=!1,c=!1,h=!1,m=!1,l=!1,i=!1,d=!1,w=!1,u=!1,p=!1,T=!1,x=!1,q=!1,B=!1,M=0,R=0,F=0,W=[],A=[],Q=[],N=null,I=[];for(let r=0;r<t.length;r++){let n=t[r];if(n.startsWith("-")&&n!=="-"){if(n==="-e"&&r+1<t.length){N=t[++r];continue}if(n.startsWith("--include=")){W.push(n.slice(10));continue}if(n.startsWith("--exclude=")){A.push(n.slice(10));continue}if(n.startsWith("--exclude-dir=")){Q.push(n.slice(14));continue}if(n.startsWith("--max-count=")){M=parseInt(n.slice(12),10);continue}let C=n.match(/^-m(\d+)$/);if(C){M=parseInt(C[1],10);continue}if(n==="-m"&&r+1<t.length){M=parseInt(t[++r],10);continue}let a=n.match(/^-([ABC])(\d+)$/);if(a){let e=parseInt(a[2],10);a[1]==="A"?F=e:a[1]==="B"?R=e:a[1]==="C"&&(R=e,F=e);continue}if((n==="-A"||n==="-B"||n==="-C")&&r+1<t.length){let e=parseInt(t[++r],10);n==="-A"?F=e:n==="-B"?R=e:(R=e,F=e);continue}let g=n.startsWith("--")?[n]:n.slice(1).split("");for(let e of g)if(e==="i"||e==="--ignore-case")o=!0;else if(e==="n"||e==="--line-number")f=!0;else if(e==="v"||e==="--invert-match")c=!0;else if(e==="c"||e==="--count")h=!0;else if(e==="l"||e==="--files-with-matches")m=!0;else if(e==="L"||e==="--files-without-match")l=!0;else if(e==="r"||e==="R"||e==="--recursive")i=!0;else if(e==="w"||e==="--word-regexp")d=!0;else if(e==="x"||e==="--line-regexp")w=!0;else if(e==="E"||e==="--extended-regexp")u=!0;else if(e==="P"||e==="--perl-regexp")p=!0;else if(e==="F"||e==="--fixed-strings")T=!0;else if(e==="o"||e==="--only-matching")x=!0;else if(e==="h"||e==="--no-filename")q=!0;else if(e==="q"||e==="--quiet"||e==="--silent")B=!0;else{if(e.startsWith("--"))return G("grep",e);if(e.length===1)return G("grep",`-${e}`)}}else N===null?N=n:I.push(n)}if(N===null)return{stdout:"",stderr:`grep: missing pattern
2
- `,exitCode:2};let V=T?"fixed":u?"extended":p?"perl":"basic",U,b;try{let r=z(N,{mode:V,ignoreCase:o,wholeWord:d,lineRegexp:w});U=r.regex,b=r.kResetGroup}catch{return{stdout:"",stderr:`grep: invalid regular expression: ${N}
3
- `,exitCode:2}}if(I.length===0&&s.stdin!==void 0){let r=S(s.stdin,U,{invertMatch:c,showLineNumbers:f,countOnly:h,filename:"",onlyMatching:x,beforeContext:R,afterContext:F,maxCount:M,kResetGroup:b});return B?{stdout:"",stderr:"",exitCode:r.matched?0:1}:{stdout:r.output,stderr:"",exitCode:r.matched?0:1}}if(I.length===0)return{stdout:"",stderr:`grep: no input files
4
- `,exitCode:2};let $="",D="",H=!1,k=!1,P=[];for(let r of I)if(r.includes("*")||r.includes("?")||r.includes("[")){let n=await se(r,s);if(i)for(let C of n){let a=await O(C.path,s,W,A,Q,C.isFile);P.push(...a)}else P.push(...n)}else if(i){let n=await O(r,s,W,A,Q);P.push(...n)}else P.push({path:r});let X=(P.length>1||i)&&!q,Z=50;for(let r=0;r<P.length;r+=Z){let n=P.slice(r,r+Z),C=await Promise.all(n.map(async a=>{let g=a.path,e=g.split("/").pop()||g;if(A.length>0&&!i&&A.some(v=>y(e,v,{stripQuotes:!0}))||W.length>0&&!i&&!W.some(v=>y(e,v,{stripQuotes:!0})))return null;try{let v=s.fs.resolvePath(s.cwd,g),L=!1;if(a.isFile===void 0?L=(await s.fs.stat(v)).isDirectory:L=!a.isFile,L)return i?null:{error:`grep: ${g}: Is a directory
5
- `};let Y=await s.fs.readFile(v),ee=S(Y,U,{invertMatch:c,showLineNumbers:f,countOnly:h,filename:X?g:"",onlyMatching:x,beforeContext:R,afterContext:F,maxCount:M,kResetGroup:b});return{file:g,result:ee}}catch{return{error:`grep: ${g}: No such file or directory
6
- `}}}));for(let a of C){if(a===null)continue;if("error"in a&&a.error){D+=a.error,a.error.includes("Is a directory")||(k=!0);continue}if(!("file"in a)||!a.result)continue;let{file:g,result:e}=a;if(e.matched){if(H=!0,B)return{stdout:"",stderr:"",exitCode:0};m?$+=`${g}
7
- `:l||($+=e.output)}else l?$+=`${g}
8
- `:h&&!m&&($+=e.output)}}let E;return k?E=2:l?E=$.length>0?0:1:E=H?0:1,B?{stdout:"",stderr:"",exitCode:E}:{stdout:$,stderr:D,exitCode:E}}};async function K(t,s,o,f){let c=o.fs.resolvePath(o.cwd,t);try{if(!(await o.fs.stat(c)).isDirectory){let l=t.split("/").pop()||"";if(s){let i=s.replace(/^\//,"");y(l,i,{stripQuotes:!0})&&f.push(t)}return}let m=await o.fs.readdir(c);for(let l of m){let i=t==="."?l:`${t}/${l}`,d=o.fs.resolvePath(o.cwd,i);if((await o.fs.stat(d)).isDirectory)await K(i,s,o,f);else if(s){let u=s.replace(/^\//,"");y(l,u,{stripQuotes:!0})&&f.push(i)}}}catch{}}async function se(t,s){let o=[],f=t.lastIndexOf("/"),c,h;if(f===-1?(c=s.cwd,h=t):(c=t.slice(0,f)||"/",h=t.slice(f+1)),t.includes("**")){let l=[],i=t.split("**"),d=i[0].replace(/\/$/,"")||".",w=i[1]||"";return await K(d,w,s,l),l.map(u=>({path:u}))}let m=s.fs.resolvePath(s.cwd,c);try{if(s.fs.readdirWithFileTypes){let l=await s.fs.readdirWithFileTypes(m);for(let i of l)if(y(i.name,h,{stripQuotes:!0})){let d=f===-1?i.name:`${c}/${i.name}`;o.push({path:d,isFile:i.isFile})}}else{let l=await s.fs.readdir(m);for(let i of l)if(y(i,h,{stripQuotes:!0})){let d=f===-1?i:`${c}/${i}`;o.push({path:d})}}}catch{}return o.sort((l,i)=>l.path.localeCompare(i.path))}async function O(t,s,o=[],f=[],c=[],h){let m=s.fs.resolvePath(s.cwd,t),l=[];try{let i,d;if(h!==void 0)i=h,d=!h;else{let u=await s.fs.stat(m);i=u.isFile,d=u.isDirectory}if(i){let u=t.split("/").pop()||t;return f.length>0&&f.some(p=>y(u,p,{stripQuotes:!0}))?[]:o.length>0&&!o.some(p=>y(u,p,{stripQuotes:!0}))?[]:[{path:t,isFile:!0}]}if(!d)return[];let w=t.split("/").pop()||t;if(c.length>0&&c.some(u=>y(w,u,{stripQuotes:!0})))return[];if(s.fs.readdirWithFileTypes){let u=await s.fs.readdirWithFileTypes(m);for(let p of u){if(p.name.startsWith("."))continue;let T=t==="."?p.name:`${t}/${p.name}`,x=await O(T,s,o,f,c,p.isFile);l.push(...x)}}else{let u=await s.fs.readdir(m);for(let p of u){if(p.startsWith("."))continue;let T=t==="."?p:`${t}/${p}`,x=await O(T,s,o,f,c);l.push(...x)}}}catch{}return l}var oe={name:"fgrep",async execute(t,s){return J.execute(["-F",...t],s)}},ae={name:"egrep",async execute(t,s){return J.execute(["-E",...t],s)}};export{ae as egrepCommand,oe as fgrepCommand,J as grepCommand};
@@ -1,31 +0,0 @@
1
- import{a as z}from"./chunk-HWKDQ44K.js";import{a as $,b as w}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";import{constants as C,gunzipSync as x,gzipSync as b}from"node:zlib";var I={name:"gzip",summary:"compress or expand files",usage:"gzip [OPTION]... [FILE]...",description:`Compress FILEs (by default, in-place).
2
-
3
- When no FILE is given, or when FILE is -, read from standard input.
4
-
5
- With -d, decompress instead.`,options:["-c, --stdout write to standard output, keep original files","-d, --decompress decompress","-f, --force force overwrite of output file","-k, --keep keep (don't delete) input files","-l, --list list compressed file contents","-n, --no-name do not save or restore the original name and timestamp","-N, --name save or restore the original file name and timestamp","-q, --quiet suppress all warnings","-r, --recursive operate recursively on directories","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode","-1, --fast compress faster","-9, --best compress better"," --help display this help and exit"]},q={name:"gunzip",summary:"decompress files",usage:"gunzip [OPTION]... [FILE]...",description:`Decompress FILEs (by default, in-place).
6
-
7
- When no FILE is given, or when FILE is -, read from standard input.`,options:["-c, --stdout write to standard output, keep original files","-f, --force force overwrite of output file","-k, --keep keep (don't delete) input files","-l, --list list compressed file contents","-n, --no-name do not restore the original name and timestamp","-N, --name restore the original file name and timestamp","-q, --quiet suppress all warnings","-r, --recursive operate recursively on directories","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},P={name:"zcat",summary:"decompress files to stdout",usage:"zcat [OPTION]... [FILE]...",description:`Decompress FILEs to standard output.
8
-
9
- When no FILE is given, or when FILE is -, read from standard input.`,options:["-f, --force force; read compressed data even from a terminal","-l, --list list compressed file contents","-q, --quiet suppress all warnings","-S, --suffix=SUF use suffix SUF on compressed files (default: .gz)","-t, --test test compressed file integrity","-v, --verbose verbose mode"," --help display this help and exit"]},L={stdout:{short:"c",long:"stdout",type:"boolean"},toStdout:{long:"to-stdout",type:"boolean"},decompress:{short:"d",long:"decompress",type:"boolean"},uncompress:{long:"uncompress",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},keep:{short:"k",long:"keep",type:"boolean"},list:{short:"l",long:"list",type:"boolean"},noName:{short:"n",long:"no-name",type:"boolean"},name:{short:"N",long:"name",type:"boolean"},quiet:{short:"q",long:"quiet",type:"boolean"},recursive:{short:"r",long:"recursive",type:"boolean"},suffix:{short:"S",long:"suffix",type:"string",default:".gz"},test:{short:"t",long:"test",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"},fast:{short:"1",long:"fast",type:"boolean"},level2:{short:"2",type:"boolean"},level3:{short:"3",type:"boolean"},level4:{short:"4",type:"boolean"},level5:{short:"5",type:"boolean"},level6:{short:"6",type:"boolean"},level7:{short:"7",type:"boolean"},level8:{short:"8",type:"boolean"},best:{short:"9",long:"best",type:"boolean"}};function F(e){return e.best?C.Z_BEST_COMPRESSION:e.level8?8:e.level7?7:e.level6?6:e.level5?5:e.level4?4:e.level3?3:e.level2?2:e.fast?C.Z_BEST_SPEED:C.Z_DEFAULT_COMPRESSION}function S(e){if(e.length<10)return{originalName:null,mtime:null,headerSize:0};if(e[0]!==31||e[1]!==139)return{originalName:null,mtime:null,headerSize:0};let t=e[3],o=e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r=10;if(t&4){if(r+2>e.length)return{originalName:null,mtime:null,headerSize:0};let s=e[r]|e[r+1]<<8;r+=2+s}let n=null;if(t&8){let s=r;for(;r<e.length&&e[r]!==0;)r++;r<e.length&&(n=new TextDecoder().decode(e.slice(s,r)),r++)}if(t&16){for(;r<e.length&&e[r]!==0;)r++;r++}return t&2&&(r+=2),{originalName:n,mtime:o>0?new Date(o*1e3):null,headerSize:r}}function D(e){if(e.length<4)return 0;let t=e.length;return e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24}function y(e){return e.length>=2&&e[0]===31&&e[1]===139}async function E(e,t,o,r,n,s){let u=o.suffix,f,p,l;if(t==="-"||t==="")if(l=Uint8Array.from(e.stdin,d=>d.charCodeAt(0)),n){if(!y(l))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: stdin: not in gzip format
10
- `,exitCode:1};try{let d=x(l);return{stdout:String.fromCharCode(...d),stderr:"",exitCode:0}}catch(d){let i=d instanceof Error?d.message:"unknown error";return{stdout:"",stderr:`${r}: stdin: ${i}
11
- `,exitCode:1}}}else{let d=F(o),i=b(l,{level:d});return{stdout:String.fromCharCode(...i),stderr:"",exitCode:0}}f=e.fs.resolvePath(e.cwd,t);try{if((await e.fs.stat(f)).isDirectory)return o.recursive?await k(e,f,o,r,n,s):o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: is a directory -- ignored
12
- `,exitCode:1}}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
13
- `,exitCode:1}}try{l=await e.fs.readFileBuffer(f)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
14
- `,exitCode:1}}if(n){if(!t.endsWith(u))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: unknown suffix -- ignored
15
- `,exitCode:1};if(!y(l))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
16
- `,exitCode:1};let d;try{d=x(l)}catch(i){let c=i instanceof Error?i.message:"unknown error";return{stdout:"",stderr:`${r}: ${t}: ${c}
17
- `,exitCode:1}}if(s)return{stdout:String.fromCharCode(...d),stderr:"",exitCode:0};if(o.name){let i=S(l);i.originalName?p=e.fs.resolvePath(e.cwd,i.originalName):p=f.slice(0,-u.length)}else p=f.slice(0,-u.length);if(!o.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${r}: ${p} already exists; not overwritten
18
- `,exitCode:1}}catch{}if(await e.fs.writeFile(p,d),!o.keep&&!s&&await e.fs.rm(f),o.verbose){let i=l.length>0?((1-l.length/d.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${i}% -- replaced with ${p.split("/").pop()}
19
- `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}else{if(t.endsWith(u))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t} already has ${u} suffix -- unchanged
20
- `,exitCode:1};let d=F(o),i;try{i=b(l,{level:d})}catch(c){let a=c instanceof Error?c.message:"unknown error";return{stdout:"",stderr:`${r}: ${t}: ${a}
21
- `,exitCode:1}}if(s)return{stdout:String.fromCharCode(...i),stderr:"",exitCode:0};if(p=f+u,!o.force)try{return await e.fs.stat(p),{stdout:"",stderr:`${r}: ${p} already exists; not overwritten
22
- `,exitCode:1}}catch{}if(await e.fs.writeFile(p,i),!o.keep&&!s&&await e.fs.rm(f),o.verbose){let c=l.length>0?((1-i.length/l.length)*100).toFixed(1):"0.0";return{stdout:"",stderr:`${t}: ${c}% -- replaced with ${p.split("/").pop()}
23
- `,exitCode:0}}return{stdout:"",stderr:"",exitCode:0}}}async function k(e,t,o,r,n,s){let u=await e.fs.readdir(t),f="",p="",l=0;for(let d of u){let i=e.fs.resolvePath(t,d),c=await e.fs.stat(i);if(c.isDirectory){let a=await k(e,i,o,r,n,s);f+=a.stdout,p+=a.stderr,a.exitCode!==0&&(l=a.exitCode)}else if(c.isFile){let a=o.suffix;if(n&&!d.endsWith(a)||!n&&d.endsWith(a))continue;let m=i.startsWith(`${e.cwd}/`)?i.slice(e.cwd.length+1):i,g=await E(e,m,o,r,n,s);f+=g.stdout,p+=g.stderr,g.exitCode!==0&&(l=g.exitCode)}}return{stdout:f,stderr:p,exitCode:l}}async function O(e,t,o,r){let n;if(t==="-"||t==="")n=Uint8Array.from(e.stdin,i=>i.charCodeAt(0));else{let i=e.fs.resolvePath(e.cwd,t);try{n=await e.fs.readFileBuffer(i)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
24
- `,exitCode:1}}}if(!y(n))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
25
- `,exitCode:1};let s=n.length,u=D(n),f=u>0?((1-s/u)*100).toFixed(1):"0.0",l=S(n).originalName||(t==="-"?"":t.replace(/\.gz$/,""));return{stdout:`${s.toString().padStart(10)} ${u.toString().padStart(10)} ${f.padStart(5)}% ${l}
26
- `,stderr:"",exitCode:0}}async function U(e,t,o,r){let n;if(t==="-"||t==="")n=Uint8Array.from(e.stdin,s=>s.charCodeAt(0));else{let s=e.fs.resolvePath(e.cwd,t);try{n=await e.fs.readFileBuffer(s)}catch{return{stdout:"",stderr:`${r}: ${t}: No such file or directory
27
- `,exitCode:1}}}if(!y(n))return o.quiet?{stdout:"",stderr:"",exitCode:1}:{stdout:"",stderr:`${r}: ${t}: not in gzip format
28
- `,exitCode:1};try{return x(n),o.verbose?{stdout:"",stderr:`${t}: OK
29
- `,exitCode:0}:{stdout:"",stderr:"",exitCode:0}}catch(s){let u=s instanceof Error?s.message:"invalid";return{stdout:"",stderr:`${r}: ${t}: ${u}
30
- `,exitCode:1}}}async function v(e,t,o){let r=o==="zcat"?P:o==="gunzip"?q:I;if(w(e))return $(r);let n=z(o,e,L);if(!n.ok)return n.error.stderr.includes("unrecognized option"),n.error;let s=n.result.flags,u=n.result.positional,f=o==="gunzip"||o==="zcat"||s.decompress||s.uncompress,p=o==="zcat"||s.stdout||s.toStdout;if(s.list){u.length===0&&(u=["-"]);let c=` compressed uncompressed ratio uncompressed_name
31
- `,a="",m=0;for(let g of u){let h=await O(t,g,s,o);c+=h.stdout,a+=h.stderr,h.exitCode!==0&&(m=h.exitCode)}return{stdout:c,stderr:a,exitCode:m}}if(s.test){u.length===0&&(u=["-"]);let c="",a="",m=0;for(let g of u){let h=await U(t,g,s,o);c+=h.stdout,a+=h.stderr,h.exitCode!==0&&(m=h.exitCode)}return{stdout:c,stderr:a,exitCode:m}}u.length===0&&(u=["-"]);let l="",d="",i=0;for(let c of u){let a=await E(t,c,s,o,f,p);l+=a.stdout,d+=a.stderr,a.exitCode!==0&&(i=a.exitCode)}return{stdout:l,stderr:d,exitCode:i}}var _={name:"gzip",async execute(e,t){return v(e,t,"gzip")}},H={name:"gunzip",async execute(e,t){return v(e,t,"gunzip")}},B={name:"zcat",async execute(e,t){return v(e,t,"zcat")}};export{H as gunzipCommand,_ as gzipCommand,B as zcatCommand};
@@ -1 +0,0 @@
1
- import{a as i,b as r,c as n}from"./chunk-HDQ56CKY.js";import{a as t,b as a}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var h={name:"head",summary:"output the first part of files",usage:"head [OPTION]... [FILE]...",options:["-c, --bytes=NUM print the first NUM bytes","-n, --lines=NUM print the first NUM lines (default 10)","-q, --quiet never print headers giving file names","-v, --verbose always print headers giving file names"," --help display this help and exit"]},u={name:"head",async execute(s,o){if(a(s))return t(h);let e=i(s,"head");if(!e.ok)return e.error;let{lines:p,bytes:l}=e.options;return r(o,e.options,"head",d=>n(d,p,l))}};export{u as headCommand};
@@ -1,15 +0,0 @@
1
- import"./chunk-DXB73IDG.js";var r=new Map([["File operations",["ls","cat","head","tail","wc","touch","mkdir","rm","cp","mv","ln","chmod","stat","readlink"]],["Text processing",["grep","sed","awk","sort","uniq","cut","tr","tee","diff"]],["Search",["find"]],["Navigation & paths",["pwd","basename","dirname","tree","du"]],["Environment & shell",["echo","printf","env","printenv","export","alias","unalias","history","clear","true","false","bash","sh"]],["Data processing",["xargs","jq","base64","date"]],["Network",["curl","html-to-markdown"]]]);function l(n){let e=[],t=new Set(n);e.push(`Available commands:
2
- `);let s=[];for(let[a,c]of r){let o=c.filter(i=>t.has(i));if(o.length>0){e.push(` ${a}:`),e.push(` ${o.join(", ")}
3
- `);for(let i of o)t.delete(i)}}for(let a of t)s.push(a);return s.length>0&&(e.push(" Other:"),e.push(` ${s.sort().join(", ")}
4
- `)),e.push("Use '<command> --help' for details on a specific command."),`${e.join(`
5
- `)}
6
- `}var d={name:"help",async execute(n,e){if(n.includes("--help")||n.includes("-h"))return{stdout:`help - display available commands
7
-
8
- Usage: help [command]
9
-
10
- Options:
11
- -h, --help Show this help message
12
-
13
- If a command name is provided, shows help for that command.
14
- Otherwise, lists all available commands.
15
- `,stderr:"",exitCode:0};if(n.length>0&&e.exec){let s=n[0];return e.exec(`${s} --help`,{cwd:e.cwd})}let t=e.getRegisteredCommands?.()??[];return{stdout:l(t),stderr:"",exitCode:0}}};export{d as helpCommand};
@@ -1,2 +0,0 @@
1
- import{a as i,b as h}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var d={name:"history",summary:"display command history",usage:"history [n]",options:["-c clear the history list"," --help display this help and exit"]},l="BASH_HISTORY",m={name:"history",async execute(e,s){if(h(e))return i(d);let a=s.env.get(l)||"[]",t;try{t=JSON.parse(a)}catch{t=[]}if(e[0]==="-c")return s.env.set(l,"[]"),{stdout:"",stderr:"",exitCode:0};let n=t.length;e[0]&&/^\d+$/.test(e[0])&&(n=Math.min(parseInt(e[0],10),t.length));let c=t.length-n,r="";for(let o=c;o<t.length;o++){let y=(o+1).toString().padStart(5," ");r+=`${y} ${t[o]}
2
- `}return{stdout:r,stderr:"",exitCode:0}}};export{m as historyCommand};
@@ -1,2 +0,0 @@
1
- import"./chunk-DXB73IDG.js";async function t(e,n){return{stdout:`localhost
2
- `,stderr:"",exitCode:0}}var o={name:"hostname",execute:t};export{o as hostname};
@@ -1,4 +0,0 @@
1
- import{a as c,b as u,c as h}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";import f from"turndown";var p={name:"html-to-markdown",summary:"convert HTML to Markdown (BashEnv extension)",usage:"html-to-markdown [OPTION]... [FILE]",description:["Convert HTML content to Markdown format using the turndown library.","This is a non-standard BashEnv extension command, not available in regular bash.","","Read HTML from FILE or standard input and output Markdown to standard output.","Commonly used with curl to convert web pages:"," curl -s https://example.com | html-to-markdown","","Supported HTML elements:"," - Headings (h1-h6) \u2192 # Markdown headings"," - Paragraphs (p) \u2192 Plain text with blank lines"," - Links (a) \u2192 [text](url)"," - Images (img) \u2192 ![alt](src)"," - Bold/Strong \u2192 **text**"," - Italic/Em \u2192 _text_"," - Code (code, pre) \u2192 `inline` or fenced blocks"," - Lists (ul, ol, li) \u2192 - or 1. items"," - Blockquotes \u2192 > quoted text"," - Horizontal rules (hr) \u2192 ---"],options:["-b, --bullet=CHAR bullet character for unordered lists (-, +, or *)","-c, --code=FENCE fence style for code blocks (``` or ~~~)","-r, --hr=STRING string for horizontal rules (default: ---)"," --heading-style=STYLE"," heading style: 'atx' for # headings (default),"," 'setext' for underlined headings (h1/h2 only)"," --help display this help and exit"],examples:["echo '<h1>Hello</h1><p>World</p>' | html-to-markdown","html-to-markdown page.html","curl -s https://example.com | html-to-markdown > page.md"]},g={name:"html-to-markdown",async execute(r,n){if(u(r))return c(p);let s="-",a="```",i="---",m="atx",o=[];for(let t=0;t<r.length;t++){let e=r[t];if(e==="-b"||e==="--bullet")s=r[++t]??"-";else if(e.startsWith("--bullet="))s=e.slice(9);else if(e==="-c"||e==="--code")a=r[++t]??"```";else if(e.startsWith("--code="))a=e.slice(7);else if(e==="-r"||e==="--hr")i=r[++t]??"---";else if(e.startsWith("--hr="))i=e.slice(5);else if(e.startsWith("--heading-style=")){let d=e.slice(16);(d==="setext"||d==="atx")&&(m=d)}else if(e==="-")o.push("-");else{if(e.startsWith("--"))return h("html-to-markdown",e);if(e.startsWith("-"))return h("html-to-markdown",e);o.push(e)}}let l;if(o.length===0||o.length===1&&o[0]==="-")l=n.stdin;else try{let t=n.fs.resolvePath(n.cwd,o[0]);l=await n.fs.readFile(t)}catch{return{stdout:"",stderr:`html-to-markdown: ${o[0]}: No such file or directory
2
- `,exitCode:1}}if(!l.trim())return{stdout:"",stderr:"",exitCode:0};try{let t=new f({bulletListMarker:s,codeBlockStyle:"fenced",fence:a,hr:i,headingStyle:m});return t.remove(["script","style","footer"]),{stdout:`${t.turndown(l).trim()}
3
- `,stderr:"",exitCode:0}}catch(t){return{stdout:"",stderr:`html-to-markdown: conversion error: ${t.message}
4
- `,exitCode:1}}}};export{g as htmlToMarkdownCommand};
@@ -1,13 +0,0 @@
1
- import{a as b,b as y,c as N}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var I={name:"join",summary:"join lines of two files on a common field",usage:"join [OPTION]... FILE1 FILE2",description:"For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.",options:["-1 FIELD Join on this FIELD of file 1 (default: 1)","-2 FIELD Join on this FIELD of file 2 (default: 1)","-t CHAR Use CHAR as input and output field separator","-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)","-v FILENUM Like -a but only output unpairable lines","-e STRING Replace missing fields with STRING","-o FORMAT Output format (comma-separated list of FILENUM.FIELD)","-i Ignore case when comparing fields"],examples:["join file1 file2 # Join on first field","join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1","join -t ',' file1.csv file2.csv # Join CSV files","join -a 1 file1 file2 # Left outer join"]};function F(t,s){return s?t.split(s):t.split(/[ \t]+/).filter(n=>n.length>0)}function L(t,s,n,f){let e=F(t,s),r=e[n-1]??"";return f&&(r=r.toLowerCase()),{fields:e,joinKey:r,original:t}}function m(t,s,n){let f=n.separator??" ";if(n.outputFormat){let l=[];for(let{file:c,field:d}of n.outputFormat){let a=c===1?t:s;a&&d===0?l.push(a.joinKey):a&&a.fields[d-1]!==void 0?l.push(a.fields[d-1]):l.push(n.emptyString)}return l.join(f)}let e=[],r=t?.joinKey??s?.joinKey??"";if(e.push(r),t)for(let l=0;l<t.fields.length;l++)l!==n.field1-1&&e.push(t.fields[l]);if(s)for(let l=0;l<s.fields.length;l++)l!==n.field2-1&&e.push(s.fields[l]);return e.join(f)}function w(t){let s=t.split(","),n=[];for(let f of s){let e=f.trim().match(/^(\d+)\.(\d+)$/);if(!e)return null;let r=Number.parseInt(e[1],10),l=Number.parseInt(e[2],10);if(r!==1&&r!==2)return null;n.push({file:r,field:l})}return n}var C={name:"join",execute:async(t,s)=>{if(y(t))return b(I);let n={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:"",outputFormat:null,ignoreCase:!1},f=[],e=0;for(;e<t.length;){let i=t[e];if(i==="-1"&&e+1<t.length){let o=Number.parseInt(t[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${t[e+1]}'
2
- `};n.field1=o,e+=2}else if(i==="-2"&&e+1<t.length){let o=Number.parseInt(t[e+1],10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`join: invalid field number: '${t[e+1]}'
3
- `};n.field2=o,e+=2}else if((i==="-t"||i==="--field-separator")&&e+1<t.length)n.separator=t[e+1],e+=2;else if(i.startsWith("-t")&&i.length>2)n.separator=i.slice(2),e++;else if(i==="-a"&&e+1<t.length){let o=Number.parseInt(t[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${t[e+1]}'
4
- `};n.printUnpairable.add(o),e+=2}else if(i.match(/^-a[12]$/))n.printUnpairable.add(Number.parseInt(i[2],10)),e++;else if(i==="-v"&&e+1<t.length){let o=Number.parseInt(t[e+1],10);if(o!==1&&o!==2)return{exitCode:1,stdout:"",stderr:`join: invalid file number: '${t[e+1]}'
5
- `};n.onlyUnpairable.add(o),e+=2}else if(i.match(/^-v[12]$/))n.onlyUnpairable.add(Number.parseInt(i[2],10)),e++;else if(i==="-e"&&e+1<t.length)n.emptyString=t[e+1],e+=2;else if(i==="-o"&&e+1<t.length){let o=w(t[e+1]);if(!o)return{exitCode:1,stdout:"",stderr:`join: invalid field spec: '${t[e+1]}'
6
- `};n.outputFormat=o,e+=2}else if(i==="-i"||i==="--ignore-case")n.ignoreCase=!0,e++;else if(i==="--"){f.push(...t.slice(e+1));break}else{if(i.startsWith("-")&&i!=="-")return N("join",i);f.push(i),e++}}if(f.length!==2)return{exitCode:1,stdout:"",stderr:f.length<2?`join: missing file operand
7
- `:`join: extra operand
8
- `};let r=[];for(let i of f)if(i==="-")r.push(s.stdin??"");else{let o=s.fs.resolvePath(s.cwd,i),u=await s.fs.readFile(o);if(u===null)return{exitCode:1,stdout:"",stderr:`join: ${i}: No such file or directory
9
- `};r.push(u)}let l=(i,o)=>{let u=i.split(`
10
- `);return i.endsWith(`
11
- `)&&u[u.length-1]===""&&u.pop(),u.filter(h=>h.length>0).map(h=>L(h,n.separator,o,n.ignoreCase))},c=l(r[0],n.field1),d=l(r[1],n.field2),a=new Map;for(let i of d){let o=a.get(i.joinKey);o?o.push(i):a.set(i.joinKey,[i])}let p=[],j=new Set;for(let i of c){let o=a.get(i.joinKey);if(o&&o.length>0){if(j.add(i.joinKey),n.onlyUnpairable.size===0)for(let u of o)p.push(m(i,u,n))}else(n.printUnpairable.has(1)||n.onlyUnpairable.has(1))&&p.push(m(i,null,n))}if(n.printUnpairable.has(2)||n.onlyUnpairable.has(2))for(let i of d)j.has(i.joinKey)||p.push(m(null,i,n));return{exitCode:0,stdout:p.length>0?`${p.join(`
12
- `)}
13
- `:"",stderr:""}}};export{C as join};
@@ -1,12 +0,0 @@
1
- import{a as w,b as J}from"./chunk-WQCJYUEW.js";import"./chunk-7MKBHGLS.js";import"./chunk-OJDRYQWQ.js";import{k as q}from"./chunk-PSW6BMXW.js";import"./chunk-YNYSPYQ5.js";import{a as N}from"./chunk-7L36YK2X.js";import"./chunk-NUFRM6SI.js";import{a as C,b as E,c as x}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";function I(s){let i=[],t=0,o=s.length;for(;t<o;){for(;t<o&&/\s/.test(s[t]);)t++;if(t>=o)break;let a=t,r=s[t];if(r==="{"||r==="["){let n=r,l=r==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<o&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===n?c++:h===l&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${n})`);i.push(JSON.parse(s.slice(a,t)))}else if(r==='"'){let n=!1;for(t++;t<o;){let l=s[t];if(n)n=!1;else if(l==="\\")n=!0;else if(l==='"'){t++;break}t++}i.push(JSON.parse(s.slice(a,t)))}else if(r==="-"||r>="0"&&r<="9"){for(;t<o&&/[\d.eE+-]/.test(s[t]);)t++;i.push(JSON.parse(s.slice(a,t)))}else if(s.slice(t,t+4)==="true")i.push(!0),t+=4;else if(s.slice(t,t+5)==="false")i.push(!1),t+=5;else if(s.slice(t,t+4)==="null")i.push(null),t+=4;else{let n=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${a}: unexpected '${n.split(/\s/)[0]}'`)}}return i}var H={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function g(s,i,t,o,a,r=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let n=a?" ":" ";if(Array.isArray(s))return s.length===0?"[]":i?`[${s.map(c=>g(c,!0,!1,o,a)).join(",")}]`:`[
2
- ${s.map(c=>n.repeat(r+1)+g(c,!1,!1,o,a,r+1)).join(`,
3
- `)}
4
- ${n.repeat(r)}]`;if(typeof s=="object"){let l=Object.keys(s);return o&&(l=l.sort()),l.length===0?"{}":i?`{${l.map(p=>`${JSON.stringify(p)}:${g(s[p],!0,!1,o,a)}`).join(",")}}`:`{
5
- ${l.map(p=>{let d=g(s[p],!1,!1,o,a,r+1);return`${n.repeat(r+1)}${JSON.stringify(p)}: ${d}`}).join(`,
6
- `)}
7
- ${n.repeat(r)}}`}return String(s)}var P={name:"jq",async execute(s,i){if(E(s))return C(H);let t=!1,o=!1,a=!1,r=!1,n=!1,l=!1,c=!1,p=!1,d=".",h=!1,j=[];for(let u=0;u<s.length;u++){let e=s[u];if(e==="-r"||e==="--raw-output")t=!0;else if(e==="-c"||e==="--compact-output")o=!0;else if(e==="-e"||e==="--exit-status")a=!0;else if(e==="-s"||e==="--slurp")r=!0;else if(e==="-n"||e==="--null-input")n=!0;else if(e==="-j"||e==="--join-output")l=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")c=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")p=!0;else if(e==="-")j.push("-");else{if(e.startsWith("--"))return x("jq",e);if(e.startsWith("-")){for(let f of e.slice(1))if(f==="r")t=!0;else if(f==="c")o=!0;else if(f==="e")a=!0;else if(f==="s")r=!0;else if(f==="n")n=!0;else if(f==="j")l=!0;else if(f!=="a"){if(f==="S")c=!0;else if(f!=="C"){if(f!=="M")return x("jq",`-${f}`)}}}else h?j.push(e):(d=e,h=!0)}}}}let S=[];if(!n)if(j.length===0||j.length===1&&j[0]==="-")S.push({source:"stdin",content:i.stdin});else{let u=await N(i,j,{cmdName:"jq",stopOnError:!0});if(u.exitCode!==0)return{stdout:"",stderr:u.stderr,exitCode:2};S=u.files.map(e=>({source:e.filename||"stdin",content:e.content}))}try{let u=J(d),e=[],f={limits:i.limits?{maxIterations:i.limits.maxJqIterations}:void 0,env:i.env};if(n)e=w(null,u,f);else if(r){let m=[];for(let{content:$}of S){let y=$.trim();y&&m.push(...I(y))}e=w(m,u,f)}else for(let{content:m}of S){let $=m.trim();if(!$)continue;let y=I($);for(let A of y)e.push(...w(A,u,f))}let b=e.map(m=>g(m,o,t,c,p)),k=l?"":`
8
- `,O=b.join(k),F=a&&(e.length===0||e.every(m=>m==null||m===!1))?1:0;return{stdout:O?l?O:`${O}
9
- `:"",stderr:"",exitCode:F}}catch(u){if(u instanceof q)return{stdout:"",stderr:`jq: ${u.message}
10
- `,exitCode:q.EXIT_CODE};let e=u.message;return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
11
- `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
12
- `,exitCode:5}}}};export{P as jqCommand};
@@ -1,9 +0,0 @@
1
- import{a as m,b as h}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var y={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},p={name:"ln",async execute(i,s){if(h(i))return m(y);let r=!1,a=!1,d=!1,t=0;for(;t<i.length&&i[t].startsWith("-");){let e=i[t];if(e==="-s"||e==="--symbolic")r=!0,t++;else if(e==="-f"||e==="--force")a=!0,t++;else if(e==="-v"||e==="--verbose")d=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(r=!0),e.includes("f")&&(a=!0),e.includes("v")&&(d=!0),t++;else if(e==="--"){t++;break}else return{stdout:"",stderr:`ln: invalid option -- '${e.slice(1)}'
2
- `,exitCode:1}}let f=i.slice(t);if(f.length<2)return{stdout:"",stderr:`ln: missing file operand
3
- `,exitCode:1};let n=f[0],l=f[1],o=s.fs.resolvePath(s.cwd,l);if(await s.fs.exists(o))if(a)try{await s.fs.rm(o,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${l}': Permission denied
4
- `,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${r?"symbolic ":""}link '${l}': File exists
5
- `,exitCode:1};try{if(r)await s.fs.symlink(n,o);else{let e=s.fs.resolvePath(s.cwd,n);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${n}': No such file or directory
6
- `,exitCode:1};await s.fs.link(e,o)}}catch(e){let u=e;return u.message.includes("EPERM")?{stdout:"",stderr:`ln: '${n}': hard link not allowed for directory
7
- `,exitCode:1}:{stdout:"",stderr:`ln: ${u.message}
8
- `,exitCode:1}}let c="";return d&&(c=`'${l}' -> '${n}'
9
- `),{stdout:c,stderr:"",exitCode:0}}};export{p as lnCommand};
@@ -1,23 +0,0 @@
1
- import"./chunk-NUFRM6SI.js";import{a as W}from"./chunk-HWKDQ44K.js";import{a as F,b as T}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";import{minimatch as H}from"minimatch";function A(i){if(i<1024)return String(i);if(i<1024*1024){let n=i/1024;return n<10?`${n.toFixed(1)}K`:`${Math.round(n)}K`}if(i<1024*1024*1024){let n=i/1048576;return n<10?`${n.toFixed(1)}M`:`${Math.round(n)}M`}let r=i/(1024*1024*1024);return r<10?`${r.toFixed(1)}G`:`${Math.round(r)}G`}function M(i){let n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][i.getMonth()],g=String(i.getDate()).padStart(2," "),$=new Date,y=new Date($.getTime()-4320*60*60*1e3);if(i>y){let w=String(i.getHours()).padStart(2,"0"),S=String(i.getMinutes()).padStart(2,"0");return`${n} ${g} ${w}:${S}`}let z=i.getFullYear();return`${n} ${g} ${z}`}var G={name:"ls",summary:"list directory contents",usage:"ls [OPTION]... [FILE]...",options:["-a, --all do not ignore entries starting with .","-A, --almost-all do not list . and ..","-d, --directory list directories themselves, not their contents","-h, --human-readable with -l, print sizes like 1K 234M 2G etc.","-l use a long listing format","-r, --reverse reverse order while sorting","-R, --recursive list subdirectories recursively","-S sort by file size, largest first","-t sort by time, newest first","-1 list one file per line"," --help display this help and exit"]},L={showAll:{short:"a",long:"all",type:"boolean"},showAlmostAll:{short:"A",long:"almost-all",type:"boolean"},longFormat:{short:"l",type:"boolean"},humanReadable:{short:"h",long:"human-readable",type:"boolean"},recursive:{short:"R",long:"recursive",type:"boolean"},reverse:{short:"r",long:"reverse",type:"boolean"},sortBySize:{short:"S",type:"boolean"},directoryOnly:{short:"d",long:"directory",type:"boolean"},sortByTime:{short:"t",type:"boolean"},onePerLine:{short:"1",type:"boolean"}},U={name:"ls",async execute(i,r){if(T(i))return F(G);let n=W("ls",i,L);if(!n.ok)return n.error;let g=n.result.flags.showAll,$=n.result.flags.showAlmostAll,y=n.result.flags.longFormat,z=n.result.flags.humanReadable,w=n.result.flags.recursive,S=n.result.flags.reverse,D=n.result.flags.sortBySize,C=n.result.flags.directoryOnly,m=n.result.flags.sortByTime;n.result.flags.onePerLine;let o=n.result.positional;o.length===0&&o.push(".");let a="",c="",f=0;for(let u=0;u<o.length;u++){let e=o[u];if(u>0&&a&&!a.endsWith(`
2
-
3
- `)&&(a+=`
4
- `),C){let l=r.fs.resolvePath(r.cwd,e);try{let s=await r.fs.stat(l);if(y){let t=s.isDirectory?"drwxr-xr-x":"-rw-r--r--",d=s.isDirectory?"/":"",h=s.size??0,p=z?A(h).padStart(5):String(h).padStart(5),P=s.mtime??new Date(0),b=M(P);a+=`${t} 1 user user ${p} ${b} ${e}${d}
5
- `}else a+=`${e}
6
- `}catch{c+=`ls: cannot access '${e}': No such file or directory
7
- `,f=2}continue}if(e.includes("*")||e.includes("?")||e.includes("[")){let l=await _(e,r,g,$,y,S,z,D);a+=l.stdout,c+=l.stderr,l.exitCode!==0&&(f=l.exitCode)}else{let l=await E(e,r,g,$,y,w,o.length>1,S,z,D);a+=l.stdout,c+=l.stderr,l.exitCode!==0&&(f=l.exitCode)}}return{stdout:a,stderr:c,exitCode:f}}};async function _(i,r,n,g,$,y=!1,z=!1,w=!1){let S=n||g,D=r.fs.getAllPaths(),C=r.fs.resolvePath(r.cwd,"."),m=[];for(let o of D){let a=o.startsWith(C)&&o.slice(C.length+1)||o;if(H(a,i)||H(o,i)){let c=a.split("/").pop()||a;if(!S&&c.startsWith("."))continue;m.push(a||o)}}if(m.length===0)return{stdout:"",stderr:`ls: ${i}: No such file or directory
8
- `,exitCode:2};if(w){let o=[];for(let a of m){let c=r.fs.resolvePath(r.cwd,a);try{let f=await r.fs.stat(c);o.push({path:a,size:f.size??0})}catch{o.push({path:a,size:0})}}o.sort((a,c)=>c.size-a.size),m.length=0,m.push(...o.map(a=>a.path))}else m.sort();if(y&&m.reverse(),$){let o=[];for(let a of m){let c=r.fs.resolvePath(r.cwd,a);try{let f=await r.fs.stat(c),u=f.isDirectory?"drwxr-xr-x":"-rw-r--r--",e=f.isDirectory?"/":"",l=f.size??0,s=z?A(l).padStart(5):String(l).padStart(5),t=f.mtime??new Date(0),d=M(t);o.push(`${u} 1 user user ${s} ${d} ${a}${e}`)}catch{o.push(`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${a}`)}}return{stdout:`${o.join(`
9
- `)}
10
- `,stderr:"",exitCode:0}}return{stdout:`${m.join(`
11
- `)}
12
- `,stderr:"",exitCode:0}}async function E(i,r,n,g,$,y,z,w=!1,S=!1,D=!1,C=!1){let m=n||g,o=r.fs.resolvePath(r.cwd,i);try{let a=await r.fs.stat(o);if(!a.isDirectory){if($){let u=a.size??0,e=S?A(u).padStart(5):String(u).padStart(5),l=a.mtime??new Date(0),s=M(l);return{stdout:`-rw-r--r-- 1 user user ${e} ${s} ${i}
13
- `,stderr:"",exitCode:0}}return{stdout:`${i}
14
- `,stderr:"",exitCode:0}}let c=await r.fs.readdir(o);if(m||(c=c.filter(u=>!u.startsWith("."))),D){let u=[];for(let e of c){let l=o==="/"?`/${e}`:`${o}/${e}`;try{let s=await r.fs.stat(l);u.push({name:e,size:s.size??0})}catch{u.push({name:e,size:0})}}u.sort((e,l)=>l.size-e.size),c=u.map(e=>e.name)}else c.sort();n&&(c=[".","..",...c]),w&&c.reverse();let f="";if((y||z)&&(f+=`${i}:
15
- `),$){f+=`total ${c.length}
16
- `;let u=c.filter(t=>t==="."||t===".."),e=c.filter(t=>t!=="."&&t!=="..");for(let t of u)f+=`drwxr-xr-x 1 user user 0 Jan 1 00:00 ${t}
17
- `;let l=[];for(let t=0;t<e.length;t+=100){let d=e.slice(t,t+100),h=await Promise.all(d.map(async p=>{let P=o==="/"?`/${p}`:`${o}/${p}`;try{let b=await r.fs.stat(P),O=b.isDirectory?"drwxr-xr-x":"-rw-r--r--",B=b.isDirectory?"/":"",x=b.size??0,J=S?A(x).padStart(5):String(x).padStart(5),R=b.mtime??new Date(0),N=M(R);return{name:p,line:`${O} 1 user user ${J} ${N} ${p}${B}
18
- `}}catch{return{name:p,line:`-rw-r--r-- 1 user user 0 Jan 1 00:00 ${p}
19
- `}}}));l.push(...h)}let s=new Map(e.map((t,d)=>[t,d]));l.sort((t,d)=>(s.get(t.name)??0)-(s.get(d.name)??0));for(let{line:t}of l)f+=t}else f+=c.join(`
20
- `)+(c.length?`
21
- `:"");if(y){let u=c.filter(s=>s!=="."&&s!==".."),e=[];if(r.fs.readdirWithFileTypes)e=(await r.fs.readdirWithFileTypes(o)).filter(t=>t.isDirectory&&u.includes(t.name)).map(t=>({name:t.name,isDirectory:!0}));else for(let s=0;s<u.length;s+=100){let t=u.slice(s,s+100),d=await Promise.all(t.map(async h=>{let p=o==="/"?`/${h}`:`${o}/${h}`;try{let P=await r.fs.stat(p);return{name:h,isDirectory:P.isDirectory}}catch{return{name:h,isDirectory:!1}}}));e.push(...d.filter(h=>h.isDirectory))}e.sort((s,t)=>s.name.localeCompare(t.name)),w&&e.reverse();let l=[];for(let s=0;s<e.length;s+=100){let t=e.slice(s,s+100),d=await Promise.all(t.map(async h=>{let p=i==="."?`./${h.name}`:`${i}/${h.name}`,P=await E(p,r,n,g,$,y,!1,w,S,D,!0);return{name:h.name,result:P}}));l.push(...d)}l.sort((s,t)=>s.name.localeCompare(t.name)),w&&l.reverse();for(let{result:s}of l)f+=`
22
- `,f+=s.stdout}return{stdout:f,stderr:"",exitCode:0}}catch{return{stdout:"",stderr:`ls: ${i}: No such file or directory
23
- `,exitCode:2}}}export{U as lsCommand};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-EIZGF4BS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var o=m("md5sum","md5","compute MD5 message digest");export{o as md5sumCommand};
@@ -1,6 +0,0 @@
1
- import{a}from"./chunk-HWKDQ44K.js";import{a as l}from"./chunk-44UOCSGV.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var g={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},y={name:"mkdir",async execute(u,o){let e=a("mkdir",u,g);if(!e.ok)return e.error;let m=e.result.flags.recursive,f=e.result.flags.verbose,n=e.result.positional;if(n.length===0)return{stdout:"",stderr:`mkdir: missing operand
2
- `,exitCode:1};let c="",t="",d=0;for(let r of n)try{let i=o.fs.resolvePath(o.cwd,r);await o.fs.mkdir(i,{recursive:m}),f&&(c+=`mkdir: created directory '${r}'
3
- `)}catch(i){let s=l(i);s.includes("ENOENT")||s.includes("no such file")?t+=`mkdir: cannot create directory '${r}': No such file or directory
4
- `:s.includes("EEXIST")||s.includes("already exists")?t+=`mkdir: cannot create directory '${r}': File exists
5
- `:t+=`mkdir: cannot create directory '${r}': ${s}
6
- `,d=1}return{stdout:c,stderr:t,exitCode:d}}};export{y as mkdirCommand};
@@ -1,6 +0,0 @@
1
- import{a as y}from"./chunk-HWKDQ44K.js";import{a as $}from"./chunk-44UOCSGV.js";import{a as g,b as u}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var C={name:"mv",summary:"move (rename) files",usage:"mv [OPTION]... SOURCE... DEST",options:["-f, --force do not prompt before overwriting","-n, --no-clobber do not overwrite an existing file","-v, --verbose explain what is being done"," --help display this help and exit"]},P={force:{short:"f",long:"force",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},O={name:"mv",async execute(m,t){if(u(m))return g(C);let s=y("mv",m,P);if(!s.ok)return s.error;let p=s.result.flags.force,d=s.result.flags.noClobber,w=s.result.flags.verbose,l=s.result.positional;if(d&&(p=!1),l.length<2)return{stdout:"",stderr:`mv: missing destination file operand
2
- `,exitCode:1};let r=l.pop()??"",v=l,n=t.fs.resolvePath(t.cwd,r),h="",c="",b=0,a=!1;try{a=(await t.fs.stat(n)).isDirectory}catch{}if(v.length>1&&!a)return{stdout:"",stderr:`mv: target '${r}' is not a directory
3
- `,exitCode:1};for(let e of v)try{let f=t.fs.resolvePath(t.cwd,e),o=n;if(a){let i=e.split("/").pop()||e;o=n==="/"?`/${i}`:`${n}/${i}`}if(d)try{await t.fs.stat(o);continue}catch{}if(await t.fs.mv(f,o),w){let i=a?`${r}/${e.split("/").pop()||e}`:r;h+=`renamed '${e}' -> '${i}'
4
- `}}catch(f){let o=$(f);o.includes("ENOENT")||o.includes("no such file")?c+=`mv: cannot stat '${e}': No such file or directory
5
- `:c+=`mv: cannot move '${e}': ${o}
6
- `,b=1}return{stdout:h,stderr:c,exitCode:b}}};export{O as mvCommand};
@@ -1,4 +0,0 @@
1
- import"./chunk-DXB73IDG.js";async function x(o,h){let s="octal",e=[],i=[];for(let t=0;t<o.length;t++){let r=o[t];if(r==="-c")e.push("char");else if(r==="-An"||r==="-A"&&o[t+1]==="n")s="none",r==="-A"&&t++;else if(r==="-t"&&o[t+1]){let n=o[++t];n==="x1"?e.push("hex"):n==="c"?e.push("char"):n.startsWith("o")&&e.push("octal")}else(!r.startsWith("-")||r==="-")&&i.push(r)}e.length===0&&e.push("octal");let c=h.stdin;if(i.length>0&&i[0]!=="-"){let t=i[0].startsWith("/")?i[0]:`${h.cwd}/${i[0]}`;try{c=await h.fs.readFile(t)}catch{return{stdout:"",stderr:`od: ${i[0]}: No such file or directory
2
- `,exitCode:1}}}let m=e.includes("char");function g(t){return t===0?" \\0":t===7?" \\a":t===8?" \\b":t===9?" \\t":t===10?" \\n":t===11?" \\v":t===12?" \\f":t===13?" \\r":t>=32&&t<127?` ${String.fromCharCode(t)}`:` ${t.toString(8).padStart(3,"0")}`}function S(t){return m?` ${t.toString(16).padStart(2,"0")}`:` ${t.toString(16).padStart(2,"0")}`}function $(t){return` ${t.toString(8).padStart(3,"0")}`}let f=[];for(let t of c)f.push(t.charCodeAt(0));let p=16,a=[];for(let t=0;t<f.length;t+=p){let r=f.slice(t,t+p);for(let n=0;n<e.length;n++){let d=e[n],u;d==="char"?u=r.map(g):d==="hex"?u=r.map(S):u=r.map($);let l="";n===0&&s!=="none"?l=`${t.toString(8).padStart(7,"0")} `:(n>0||s==="none")&&(l=s==="none"?"":" "),a.push(l+u.join(""))}}return s!=="none"&&f.length>0&&a.push(f.length.toString(8).padStart(7,"0")),{stdout:a.length>0?`${a.join(`
3
- `)}
4
- `:"",stderr:"",exitCode:0}}var y={name:"od",execute:x};export{y as od};
@@ -1,7 +0,0 @@
1
- import{a as g}from"./chunk-HWKDQ44K.js";import{a as c,b as m}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var L={name:"paste",summary:"merge lines of files",usage:"paste [OPTION]... [FILE]...",description:["Write lines consisting of the sequentially corresponding lines from","each FILE, separated by TABs, to standard output.","","With no FILE, or when FILE is -, read standard input."],options:["-d, --delimiters=LIST reuse characters from LIST instead of TABs","-s, --serial paste one file at a time instead of in parallel"," --help display this help and exit"],examples:["paste file1 file2 Merge file1 and file2 side by side","paste -d, file1 file2 Use comma as delimiter","paste -s file1 Paste all lines of file1 on one line","paste - - < file Paste pairs of lines from file"]},x={delimiter:{short:"d",long:"delimiters",type:"string",default:" "},serial:{short:"s",long:"serial",type:"boolean"}},P={name:"paste",async execute(s,i){if(m(s))return c(L);let n=g("paste",s,x);if(!n.ok)return n.error;let l=n.result.flags.delimiter,d=n.result.flags.serial,p=n.result.positional;if(p.length===0)return{stdout:"",stderr:`usage: paste [-s] [-d delimiters] file ...
2
- `,exitCode:1};let a=i.stdin?i.stdin.split(`
3
- `):[""];a.length>0&&a[a.length-1]===""&&a.pop();let I=p.filter(e=>e==="-").length,f=[],u=0;for(let e of p)if(e==="-"){let t=[];for(let o=u;o<a.length;o+=I)t.push(a[o]);f.push(t),u++}else{let t=i.fs.resolvePath(i.cwd,e);try{let r=(await i.fs.readFile(t)).split(`
4
- `);r.length>0&&r[r.length-1]===""&&r.pop(),f.push(r)}catch{return{stdout:"",stderr:`paste: ${e}: No such file or directory
5
- `,exitCode:1}}}let h="";if(d)for(let e of f)e&&(h+=`${y(e,l)}
6
- `);else{let e=Math.max(...f.map(t=>t?.length??0));for(let t=0;t<e;t++){let o=[];for(let r of f)o.push(r?.[t]??"");h+=`${y(o,l)}
7
- `}}return{stdout:h,stderr:"",exitCode:0}}};function y(s,i){if(s.length===0)return"";if(s.length===1)return s[0];let n=s[0];for(let l=1;l<s.length;l++){let d=(l-1)%i.length;n+=i[d]+s[l]}return n}export{P as pasteCommand};
@@ -1,2 +0,0 @@
1
- import"./chunk-DXB73IDG.js";var f={name:"pwd",async execute(r,t){let s=!1;for(let e of r)if(e==="-P")s=!0;else if(e==="-L")s=!1;else{if(e==="--")break;e.startsWith("-")}let a=t.cwd;if(s)try{a=await t.fs.realpath(t.cwd)}catch{}return{stdout:`${a}
2
- `,stderr:"",exitCode:0}}};export{f as pwdCommand};
@@ -1,6 +0,0 @@
1
- import{a as h,b as u}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var m={name:"readlink",summary:"print resolved symbolic links or canonical file names",usage:"readlink [OPTIONS] FILE...",options:["-f canonicalize by following every symlink in every component of the given name recursively"," --help display this help and exit"]},y={name:"readlink",async execute(i,r){if(u(i))return h(m);let s=!1,t=0;for(;t<i.length&&i[t].startsWith("-");){let n=i[t];if(n==="-f"||n==="--canonicalize")s=!0,t++;else if(n==="--"){t++;break}else return{stdout:"",stderr:`readlink: invalid option -- '${n.slice(1)}'
2
- `,exitCode:1}}let d=i.slice(t);if(d.length===0)return{stdout:"",stderr:`readlink: missing operand
3
- `,exitCode:1};let l="",c=!1;for(let n of d){let a=r.fs.resolvePath(r.cwd,n);try{if(s){let e=a,f=new Set;for(;!f.has(e);){f.add(e);try{let o=await r.fs.readlink(e);if(o.startsWith("/"))e=o;else{let k=e.substring(0,e.lastIndexOf("/"))||"/";e=r.fs.resolvePath(k,o)}}catch{break}}l+=`${e}
4
- `}else{let e=await r.fs.readlink(a);l+=`${e}
5
- `}}catch{s?l+=`${a}
6
- `:c=!0}}return{stdout:l,stderr:"",exitCode:c?1:0}}};export{y as readlinkCommand};
@@ -1,6 +0,0 @@
1
- import{a as f,b as a,c}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var u={name:"rev",summary:"reverse lines characterwise",usage:"rev [file ...]",description:"Copies the specified files to standard output, reversing the order of characters in every line. If no files are specified, standard input is read.",examples:["echo 'hello' | rev # Output: olleh","rev file.txt # Reverse each line in file"]};function d(t){return Array.from(t).reverse().join("")}var v={name:"rev",execute:async(t,n)=>{if(a(t))return f(u);let o=[];for(let e of t)if(e==="--"){let r=t.indexOf(e);o.push(...t.slice(r+1));break}else{if(e.startsWith("-")&&e!=="-")return c("rev",e);o.push(e)}let s="",l=e=>{let r=e.split(`
2
- `),i=e.endsWith(`
3
- `)&&r[r.length-1]==="";return i&&r.pop(),r.map(d).join(`
4
- `)+(i?`
5
- `:"")};if(o.length===0){let e=n.stdin??"";s=l(e)}else for(let e of o)if(e==="-"){let r=n.stdin??"";s+=l(r)}else{let r=n.fs.resolvePath(n.cwd,e),i=await n.fs.readFile(r);if(i===null)return{exitCode:1,stdout:s,stderr:`rev: ${e}: No such file or directory
6
- `};s+=l(i)}return{exitCode:0,stdout:s,stderr:""}}};export{v as rev};
@@ -1,7 +0,0 @@
1
- import{a as u}from"./chunk-HWKDQ44K.js";import{a as m}from"./chunk-44UOCSGV.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var v={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},y={name:"rm",async execute(d,s){let e=u("rm",d,v);if(!e.ok)return e.error;let a=e.result.flags.recursive||e.result.flags.recursiveUpper,c=e.result.flags.force,p=e.result.flags.verbose,l=e.result.positional;if(l.length===0)return c?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
2
- `,exitCode:1};let f="",t="",i=0;for(let r of l)try{let n=s.fs.resolvePath(s.cwd,r);if((await s.fs.stat(n)).isDirectory&&!a){t+=`rm: cannot remove '${r}': Is a directory
3
- `,i=1;continue}await s.fs.rm(n,{recursive:a,force:c}),p&&(f+=`removed '${r}'
4
- `)}catch(n){if(!c){let o=m(n);o.includes("ENOENT")||o.includes("no such file")?t+=`rm: cannot remove '${r}': No such file or directory
5
- `:o.includes("ENOTEMPTY")||o.includes("not empty")?t+=`rm: cannot remove '${r}': Directory not empty
6
- `:t+=`rm: cannot remove '${r}': ${o}
7
- `,i=1}}return{stdout:f,stderr:t,exitCode:i}}};export{y as rmCommand};
@@ -1,6 +0,0 @@
1
- import"./chunk-DXB73IDG.js";var F={name:"seq",async execute(r){let d=`
2
- `,h=!1,i=[],e=0;for(;e<r.length;){let t=r[e];if(t==="-s"&&e+1<r.length){d=r[e+1],e+=2;continue}if(t==="-w"){h=!0,e++;continue}if(t==="--"){e++;break}if(t.startsWith("-")&&t!=="-"){if(t.startsWith("-s")&&t.length>2){d=t.slice(2),e++;continue}if((t==="-ws"||t==="-sw")&&(h=!0,e+1<r.length)){d=r[e+1],e+=2;continue}}i.push(t),e++}for(;e<r.length;)i.push(r[e]),e++;if(i.length===0)return{stdout:"",stderr:`seq: missing operand
3
- `,exitCode:1};let l=1,o=1,a;if(i.length===1?a=parseFloat(i[0]):i.length===2?(l=parseFloat(i[0]),a=parseFloat(i[1])):(l=parseFloat(i[0]),o=parseFloat(i[1]),a=parseFloat(i[2])),Number.isNaN(l)||Number.isNaN(o)||Number.isNaN(a))return{stdout:"",stderr:`seq: invalid floating point argument: '${i.find(n=>Number.isNaN(parseFloat(n)))}'
4
- `,exitCode:1};if(o===0)return{stdout:"",stderr:`seq: invalid Zero increment value: '0'
5
- `,exitCode:1};let s=[],f=t=>{let n=String(t),u=n.indexOf(".");return u===-1?0:n.length-u-1},c=Math.max(f(l),f(o),f(a)),p=1e5,m=0;if(o>0)for(let t=l;t<=a+1e-10&&!(m++>p);t+=o)s.push(c>0?t.toFixed(c):String(Math.round(t)));else for(let t=l;t>=a-1e-10&&!(m++>p);t+=o)s.push(c>0?t.toFixed(c):String(Math.round(t)));if(h&&s.length>0){let t=Math.max(...s.map(n=>n.replace("-","").length));for(let n=0;n<s.length;n++){let u=s[n].startsWith("-"),x=(u?s[n].slice(1):s[n]).padStart(t,"0");s[n]=u?`-${x}`:x}}let g=s.join(d);return{stdout:g?`${g}
6
- `:"",stderr:"",exitCode:0}}};export{F as seqCommand};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-EIZGF4BS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var e=m("sha1sum","sha1","compute SHA1 message digest");export{e as sha1sumCommand};
@@ -1 +0,0 @@
1
- import{a as m}from"./chunk-EIZGF4BS.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var e=m("sha256sum","sha256","compute SHA256 message digest");export{e as sha256sumCommand};
@@ -1,9 +0,0 @@
1
- import{a,b as o}from"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";var i={name:"sleep",summary:"delay for a specified amount of time",usage:"sleep NUMBER[SUFFIX]",description:`Pause for NUMBER seconds. SUFFIX may be:
2
- s - seconds (default)
3
- m - minutes
4
- h - hours
5
- d - days
6
-
7
- NUMBER may be a decimal number.`,options:[" --help display this help and exit"]};function l(t){let s=t.match(/^(\d+\.?\d*)(s|m|h|d)?$/);if(!s)return null;let e=parseFloat(s[1]);switch(s[2]||"s"){case"s":return e*1e3;case"m":return e*60*1e3;case"h":return e*60*60*1e3;case"d":return e*24*60*60*1e3;default:return null}}var d={name:"sleep",async execute(t,s){if(o(t))return a(i);if(t.length===0)return{stdout:"",stderr:`sleep: missing operand
8
- `,exitCode:1};let e=0;for(let n of t){let r=l(n);if(r===null)return{stdout:"",stderr:`sleep: invalid time interval '${n}'
9
- `,exitCode:1};e+=r}return s.sleep?await s.sleep(e):await new Promise(n=>setTimeout(n,e)),{stdout:"",stderr:"",exitCode:0}}};export{d as sleepCommand};