just-bash 1.2.4 → 1.3.0

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 (223) hide show
  1. package/README.md +1 -1
  2. package/dist/ai/index.d.ts +5 -0
  3. package/dist/bin/chunks/alias-ZAQAKC5X.js +7 -0
  4. package/dist/bin/chunks/awk2-A73ZNFXJ.js +20 -0
  5. package/dist/bin/chunks/base64-JPITV4MD.js +6 -0
  6. package/dist/bin/chunks/base64-KNBBHA5Y.js +5 -0
  7. package/dist/bin/chunks/basename-IYEP3AMY.js +6 -0
  8. package/dist/bin/chunks/bash-WZYHIZP6.js +7 -0
  9. package/dist/bin/chunks/cat-XILYL7NW.js +6 -0
  10. package/dist/bin/chunks/chmod-EXWX4N7Y.js +9 -0
  11. package/dist/bin/chunks/chunk-7Q4WQLOS.js +9 -0
  12. package/dist/bin/chunks/chunk-GX4MPCG6.js +9 -0
  13. package/dist/bin/chunks/chunk-PM2DS2YW.js +3 -0
  14. package/dist/bin/chunks/chunk-SJXDWN5X.js +2 -0
  15. package/dist/bin/chunks/clear-2APRIRCF.js +2 -0
  16. package/dist/bin/chunks/comm-KY3COLF5.js +13 -0
  17. package/dist/bin/chunks/cp-HES4UN7K.js +8 -0
  18. package/dist/bin/chunks/curl-BN5M3BUX.js +26 -0
  19. package/dist/bin/chunks/cut-JSIPAKOX.js +6 -0
  20. package/dist/bin/chunks/date-CU4J7GHI.js +5 -0
  21. package/dist/bin/chunks/diff-W4JRNHXW.js +19 -0
  22. package/dist/bin/chunks/dirname-UTCUUILN.js +5 -0
  23. package/dist/bin/chunks/du-2JU3PUTM.js +8 -0
  24. package/dist/bin/chunks/echo-HKLPYMNC.js +4 -0
  25. package/dist/bin/chunks/env-2SBJNP7X.js +9 -0
  26. package/dist/bin/chunks/expr-M74QZQ6C.js +5 -0
  27. package/dist/bin/chunks/file-Q4UOC4J2.js +23 -0
  28. package/dist/bin/chunks/file-QPD3U2H7.js +23 -0
  29. package/dist/bin/chunks/find-D3ZC5DXH.js +11 -0
  30. package/dist/bin/chunks/find-JADNFF7V.js +11 -0
  31. package/dist/bin/chunks/grep-BEZRXAWL.js +15 -0
  32. package/dist/bin/chunks/head-YGMY3DHE.js +2 -0
  33. package/dist/bin/chunks/help-UEF7LW7F.js +16 -0
  34. package/dist/bin/chunks/history-OGBCIAR5.js +3 -0
  35. package/dist/bin/chunks/html-to-markdown-HTGML4TH.js +84 -0
  36. package/dist/bin/chunks/jq-ME57VHK6.js +14 -0
  37. package/dist/bin/chunks/ln-RUR4ALOJ.js +10 -0
  38. package/dist/bin/chunks/ls-GU5227KE.js +26 -0
  39. package/dist/bin/chunks/md5sum-C7WDEYN5.js +2 -0
  40. package/dist/bin/chunks/md5sum-KZ4MRIXM.js +2 -0
  41. package/dist/bin/chunks/mkdir-4OYU22AA.js +7 -0
  42. package/dist/bin/chunks/mv-H3S4FEWR.js +7 -0
  43. package/dist/bin/chunks/paste-HHCFASL4.js +8 -0
  44. package/dist/bin/chunks/printf-2JFCUFOA.js +14 -0
  45. package/dist/bin/chunks/printf-WM4X6IZ6.js +14 -0
  46. package/dist/bin/chunks/pwd-T5Q3JEBO.js +3 -0
  47. package/dist/bin/chunks/readlink-M44TLMFS.js +7 -0
  48. package/dist/bin/chunks/rm-R4M647EC.js +8 -0
  49. package/dist/bin/chunks/sed-QLLAZYHH.js +80 -0
  50. package/dist/bin/chunks/seq-GJMQM7SP.js +7 -0
  51. package/dist/bin/chunks/sha1sum-WKCGV66X.js +2 -0
  52. package/dist/bin/chunks/sha1sum-XLRE72T4.js +2 -0
  53. package/dist/bin/chunks/sha256sum-3ZDGP5WC.js +2 -0
  54. package/dist/bin/chunks/sha256sum-BBKWFA43.js +2 -0
  55. package/dist/bin/chunks/sleep-OJPODQGM.js +10 -0
  56. package/dist/bin/chunks/sort-JL33INQB.js +16 -0
  57. package/dist/bin/chunks/sort-NCQNGVCX.js +16 -0
  58. package/dist/bin/chunks/sort-WGKQ3WYR.js +15 -0
  59. package/dist/bin/chunks/stat-CR2INBC2.js +9 -0
  60. package/dist/bin/chunks/tail-BYPLMYMZ.js +2 -0
  61. package/dist/bin/chunks/tee-HOMRRC3X.js +3 -0
  62. package/dist/bin/chunks/timeout-MYKG34DQ.js +12 -0
  63. package/dist/bin/chunks/touch-3ZANYAXI.js +4 -0
  64. package/dist/bin/chunks/tr-E66N7IS2.js +20 -0
  65. package/dist/bin/chunks/tree-EE2PYIMV.js +12 -0
  66. package/dist/bin/chunks/true-OWPVS7U4.js +2 -0
  67. package/dist/bin/chunks/uniq-F5NP3LLU.js +5 -0
  68. package/dist/bin/chunks/wc-NBMNJDZL.js +6 -0
  69. package/dist/bin/chunks/which-6MRG2UCF.js +3 -0
  70. package/dist/bin/chunks/xargs-EMY5BOJ2.js +4 -0
  71. package/dist/bin/chunks/xargs-XAZFX5J3.js +4 -0
  72. package/dist/bin/just-bash.js +36 -36
  73. package/dist/bin/shell/chunks/alias-ZAQAKC5X.js +7 -0
  74. package/dist/bin/shell/chunks/awk2-A73ZNFXJ.js +20 -0
  75. package/dist/bin/shell/chunks/base64-JPITV4MD.js +6 -0
  76. package/dist/bin/shell/chunks/base64-KNBBHA5Y.js +5 -0
  77. package/dist/bin/shell/chunks/basename-IYEP3AMY.js +6 -0
  78. package/dist/bin/shell/chunks/bash-WZYHIZP6.js +7 -0
  79. package/dist/bin/shell/chunks/cat-XILYL7NW.js +6 -0
  80. package/dist/bin/shell/chunks/chmod-EXWX4N7Y.js +9 -0
  81. package/dist/bin/shell/chunks/chunk-7Q4WQLOS.js +9 -0
  82. package/dist/bin/shell/chunks/chunk-GX4MPCG6.js +9 -0
  83. package/dist/bin/shell/chunks/chunk-PM2DS2YW.js +3 -0
  84. package/dist/bin/shell/chunks/chunk-SJXDWN5X.js +2 -0
  85. package/dist/bin/shell/chunks/clear-2APRIRCF.js +2 -0
  86. package/dist/bin/shell/chunks/comm-KY3COLF5.js +13 -0
  87. package/dist/bin/shell/chunks/cp-HES4UN7K.js +8 -0
  88. package/dist/bin/shell/chunks/curl-BN5M3BUX.js +26 -0
  89. package/dist/bin/shell/chunks/cut-JSIPAKOX.js +6 -0
  90. package/dist/bin/shell/chunks/date-CU4J7GHI.js +5 -0
  91. package/dist/bin/shell/chunks/diff-W4JRNHXW.js +19 -0
  92. package/dist/bin/shell/chunks/dirname-UTCUUILN.js +5 -0
  93. package/dist/bin/shell/chunks/du-2JU3PUTM.js +8 -0
  94. package/dist/bin/shell/chunks/echo-HKLPYMNC.js +4 -0
  95. package/dist/bin/shell/chunks/env-2SBJNP7X.js +9 -0
  96. package/dist/bin/shell/chunks/expr-M74QZQ6C.js +5 -0
  97. package/dist/bin/shell/chunks/file-Q4UOC4J2.js +23 -0
  98. package/dist/bin/shell/chunks/file-QPD3U2H7.js +23 -0
  99. package/dist/bin/shell/chunks/find-D3ZC5DXH.js +11 -0
  100. package/dist/bin/shell/chunks/find-JADNFF7V.js +11 -0
  101. package/dist/bin/shell/chunks/grep-BEZRXAWL.js +15 -0
  102. package/dist/bin/shell/chunks/head-YGMY3DHE.js +2 -0
  103. package/dist/bin/shell/chunks/help-UEF7LW7F.js +16 -0
  104. package/dist/bin/shell/chunks/history-OGBCIAR5.js +3 -0
  105. package/dist/bin/shell/chunks/html-to-markdown-HTGML4TH.js +84 -0
  106. package/dist/bin/shell/chunks/jq-ME57VHK6.js +14 -0
  107. package/dist/bin/shell/chunks/ln-RUR4ALOJ.js +10 -0
  108. package/dist/bin/shell/chunks/ls-GU5227KE.js +26 -0
  109. package/dist/bin/shell/chunks/md5sum-C7WDEYN5.js +2 -0
  110. package/dist/bin/shell/chunks/md5sum-KZ4MRIXM.js +2 -0
  111. package/dist/bin/shell/chunks/mkdir-4OYU22AA.js +7 -0
  112. package/dist/bin/shell/chunks/mv-H3S4FEWR.js +7 -0
  113. package/dist/bin/shell/chunks/paste-HHCFASL4.js +8 -0
  114. package/dist/bin/shell/chunks/printf-2JFCUFOA.js +14 -0
  115. package/dist/bin/shell/chunks/printf-WM4X6IZ6.js +14 -0
  116. package/dist/bin/shell/chunks/pwd-T5Q3JEBO.js +3 -0
  117. package/dist/bin/shell/chunks/readlink-M44TLMFS.js +7 -0
  118. package/dist/bin/shell/chunks/rm-R4M647EC.js +8 -0
  119. package/dist/bin/shell/chunks/sed-QLLAZYHH.js +80 -0
  120. package/dist/bin/shell/chunks/seq-GJMQM7SP.js +7 -0
  121. package/dist/bin/shell/chunks/sha1sum-WKCGV66X.js +2 -0
  122. package/dist/bin/shell/chunks/sha1sum-XLRE72T4.js +2 -0
  123. package/dist/bin/shell/chunks/sha256sum-3ZDGP5WC.js +2 -0
  124. package/dist/bin/shell/chunks/sha256sum-BBKWFA43.js +2 -0
  125. package/dist/bin/shell/chunks/sleep-OJPODQGM.js +10 -0
  126. package/dist/bin/shell/chunks/sort-JL33INQB.js +16 -0
  127. package/dist/bin/shell/chunks/sort-NCQNGVCX.js +16 -0
  128. package/dist/bin/shell/chunks/sort-WGKQ3WYR.js +15 -0
  129. package/dist/bin/shell/chunks/stat-CR2INBC2.js +9 -0
  130. package/dist/bin/shell/chunks/tail-BYPLMYMZ.js +2 -0
  131. package/dist/bin/shell/chunks/tee-HOMRRC3X.js +3 -0
  132. package/dist/bin/shell/chunks/timeout-MYKG34DQ.js +12 -0
  133. package/dist/bin/shell/chunks/touch-3ZANYAXI.js +4 -0
  134. package/dist/bin/shell/chunks/tr-E66N7IS2.js +20 -0
  135. package/dist/bin/shell/chunks/tree-EE2PYIMV.js +12 -0
  136. package/dist/bin/shell/chunks/true-OWPVS7U4.js +2 -0
  137. package/dist/bin/shell/chunks/uniq-F5NP3LLU.js +5 -0
  138. package/dist/bin/shell/chunks/wc-NBMNJDZL.js +6 -0
  139. package/dist/bin/shell/chunks/which-6MRG2UCF.js +3 -0
  140. package/dist/bin/shell/chunks/xargs-EMY5BOJ2.js +4 -0
  141. package/dist/bin/shell/chunks/xargs-XAZFX5J3.js +4 -0
  142. package/dist/bin/shell/shell.js +1 -1
  143. package/dist/bundle/ai/index.js +384 -343
  144. package/dist/bundle/chunks/alias-JFIUWFGE.js +6 -0
  145. package/dist/bundle/chunks/awk2-QWBT4IFJ.js +19 -0
  146. package/dist/bundle/chunks/base64-JN6XXTIG.js +4 -0
  147. package/dist/bundle/chunks/base64-TUA2XORD.js +5 -0
  148. package/dist/bundle/chunks/basename-5UVU5RXR.js +5 -0
  149. package/dist/bundle/chunks/bash-BASUPKHJ.js +6 -0
  150. package/dist/bundle/chunks/cat-47EP4IAV.js +5 -0
  151. package/dist/bundle/chunks/chmod-XJXFAD4M.js +8 -0
  152. package/dist/bundle/chunks/chunk-2RUN43TJ.js +1 -0
  153. package/dist/bundle/chunks/chunk-46TSKXFW.js +8 -0
  154. package/dist/bundle/chunks/chunk-4HEWHW5W.js +8 -0
  155. package/dist/bundle/chunks/chunk-NWEGHOXL.js +2 -0
  156. package/dist/bundle/chunks/clear-XD3TJRVQ.js +1 -0
  157. package/dist/bundle/chunks/comm-KSJ4BBRQ.js +12 -0
  158. package/dist/bundle/chunks/cp-37OVLNLD.js +7 -0
  159. package/dist/bundle/chunks/curl-C43O5WQS.js +25 -0
  160. package/dist/bundle/chunks/cut-FIZRELKC.js +5 -0
  161. package/dist/bundle/chunks/date-NN5C354M.js +4 -0
  162. package/dist/bundle/chunks/diff-GLRVCAKJ.js +6 -0
  163. package/dist/bundle/chunks/dirname-U2KVUSQY.js +4 -0
  164. package/dist/bundle/chunks/du-KRAFOIQK.js +7 -0
  165. package/dist/bundle/chunks/echo-WUKBESC7.js +3 -0
  166. package/dist/bundle/chunks/env-MSPSPGCD.js +8 -0
  167. package/dist/bundle/chunks/expr-HYOCSWK6.js +4 -0
  168. package/dist/bundle/chunks/file-JMDIXLHY.js +22 -0
  169. package/dist/bundle/chunks/file-LQXX6P4Y.js +22 -0
  170. package/dist/bundle/chunks/find-5UN24ZV7.js +10 -0
  171. package/dist/bundle/chunks/find-R6LJIRBI.js +10 -0
  172. package/dist/bundle/chunks/grep-ZJVDG3FA.js +14 -0
  173. package/dist/bundle/chunks/head-6PAUYCDP.js +1 -0
  174. package/dist/bundle/chunks/help-5E6PYJWQ.js +15 -0
  175. package/dist/bundle/chunks/history-SG6VRATI.js +2 -0
  176. package/dist/bundle/chunks/html-to-markdown-ZSZ34PAN.js +4 -0
  177. package/dist/bundle/chunks/jq-ABWUP4LV.js +13 -0
  178. package/dist/bundle/chunks/ln-XFYHBIFL.js +9 -0
  179. package/dist/bundle/chunks/ls-JGYJQA2Y.js +23 -0
  180. package/dist/bundle/chunks/md5sum-3BXZVFKC.js +1 -0
  181. package/dist/bundle/chunks/md5sum-PIH6F3O3.js +1 -0
  182. package/dist/bundle/chunks/mkdir-HA2FJX4O.js +6 -0
  183. package/dist/bundle/chunks/mv-7I62SB3I.js +6 -0
  184. package/dist/bundle/chunks/paste-QBGVCQFT.js +7 -0
  185. package/dist/bundle/chunks/printf-HBP44PXI.js +13 -0
  186. package/dist/bundle/chunks/printf-O2UW73XK.js +13 -0
  187. package/dist/bundle/chunks/pwd-CEF235GL.js +2 -0
  188. package/dist/bundle/chunks/readlink-MQIMKDSA.js +6 -0
  189. package/dist/bundle/chunks/rm-NF3FNLAY.js +7 -0
  190. package/dist/bundle/chunks/sed-H2RWPMTM.js +79 -0
  191. package/dist/bundle/chunks/seq-VKYIUOPJ.js +6 -0
  192. package/dist/bundle/chunks/sha1sum-HVHNZSEC.js +1 -0
  193. package/dist/bundle/chunks/sha1sum-MSBXCB4N.js +1 -0
  194. package/dist/bundle/chunks/sha256sum-REOOJORK.js +1 -0
  195. package/dist/bundle/chunks/sha256sum-YMKJMSTW.js +1 -0
  196. package/dist/bundle/chunks/sleep-AFN3PHJW.js +9 -0
  197. package/dist/bundle/chunks/sort-R3YWDMTV.js +14 -0
  198. package/dist/bundle/chunks/sort-TEXV7CUR.js +15 -0
  199. package/dist/bundle/chunks/sort-XODGFZC4.js +15 -0
  200. package/dist/bundle/chunks/stat-FVFLDQGP.js +8 -0
  201. package/dist/bundle/chunks/tail-QXKYHAML.js +1 -0
  202. package/dist/bundle/chunks/tee-W5HCCBPO.js +2 -0
  203. package/dist/bundle/chunks/timeout-XAA3N7CF.js +11 -0
  204. package/dist/bundle/chunks/touch-FOE745V2.js +3 -0
  205. package/dist/bundle/chunks/tr-LMLGE4IE.js +19 -0
  206. package/dist/bundle/chunks/tree-WBUGLVP5.js +11 -0
  207. package/dist/bundle/chunks/true-6LGCG4EY.js +1 -0
  208. package/dist/bundle/chunks/uniq-7PFWPNWK.js +4 -0
  209. package/dist/bundle/chunks/wc-GV5WUREX.js +5 -0
  210. package/dist/bundle/chunks/which-KHFYPBWW.js +2 -0
  211. package/dist/bundle/chunks/xargs-7KV5F66T.js +3 -0
  212. package/dist/bundle/chunks/xargs-NQBNFMCT.js +3 -0
  213. package/dist/bundle/index.js +1 -1
  214. package/dist/commands/comm/comm.d.ts +10 -0
  215. package/dist/commands/file/file.d.ts +7 -0
  216. package/dist/commands/md5sum/checksum.d.ts +7 -0
  217. package/dist/commands/md5sum/md5sum.d.ts +2 -0
  218. package/dist/commands/md5sum/sha1sum.d.ts +2 -0
  219. package/dist/commands/md5sum/sha256sum.d.ts +2 -0
  220. package/dist/commands/printf/escapes.d.ts +2 -1
  221. package/dist/commands/registry.d.ts +1 -1
  222. package/dist/commands/sort/types.d.ts +12 -0
  223. package/package.json +2 -1
@@ -0,0 +1,4 @@
1
+ import{b as g}from"./chunk-3YNHMZ5M.js";import{a as f}from"./chunk-ZVV5VXYZ.js";import{a as p,b as d}from"./chunk-74CEPOFO.js";import"./chunk-2RUN43TJ.js";var b={name:"uniq",summary:"report or omit repeated lines",usage:"uniq [OPTION]... [INPUT [OUTPUT]]",options:["-c, --count prefix lines by the number of occurrences","-d, --repeated only print duplicate lines","-i, --ignore-case ignore case when comparing","-u, --unique only print unique lines"," --help display this help and exit"]},w={count:{short:"c",long:"count",type:"boolean"},duplicatesOnly:{short:"d",long:"repeated",type:"boolean"},uniqueOnly:{short:"u",long:"unique",type:"boolean"},ignoreCase:{short:"i",long:"ignore-case",type:"boolean"}},P={name:"uniq",async execute(a,m){if(d(a))return p(b);let o=f("uniq",a,w);if(!o.ok)return o.error;let{count:h,duplicatesOnly:y,uniqueOnly:q,ignoreCase:C}=o.result.flags,O=o.result.positional,u=await g(m,O,{cmdName:"uniq"});if(!u.ok)return u.error;let n=u.content.split(`
2
+ `);if(n.length>0&&n[n.length-1]===""&&n.pop(),n.length===0)return{stdout:"",stderr:"",exitCode:0};let t=[],r=n[0],i=1,x=(e,s)=>C?e.toLowerCase()===s.toLowerCase():e===s;for(let e=1;e<n.length;e++)x(n[e],r)?i++:(t.push({line:r,count:i}),r=n[e],i=1);t.push({line:r,count:i});let l=t;y?l=t.filter(e=>e.count>1):q&&(l=t.filter(e=>e.count===1));let c="";for(let{line:e,count:s}of l)h?c+=`${String(s).padStart(4)} ${e}
3
+ `:c+=`${e}
4
+ `;return{stdout:c,stderr:"",exitCode:0}}};export{P as uniqCommand};
@@ -0,0 +1,5 @@
1
+ import{a as y}from"./chunk-3YNHMZ5M.js";import{a as g}from"./chunk-ZVV5VXYZ.js";import{a as w,b as m}from"./chunk-74CEPOFO.js";import"./chunk-2RUN43TJ.js";var C={name:"wc",summary:"print newline, word, and byte counts for each file",usage:"wc [OPTION]... [FILE]...",options:["-c, --bytes print the byte counts","-m, --chars print the character counts","-l, --lines print the newline counts","-w, --words print the word counts"," --help display this help and exit"]},S={lines:{short:"l",long:"lines",type:"boolean"},words:{short:"w",long:"words",type:"boolean"},bytes:{short:"c",long:"bytes",type:"boolean"},chars:{short:"m",long:"chars",type:"boolean"}},L={name:"wc",async execute(n,l){if(m(n))return w(C);let r=g("wc",n,S);if(!r.ok)return r.error;let{lines:s,words:t}=r.result.flags,e=r.result.flags.bytes||r.result.flags.chars,o=r.result.positional;!s&&!t&&!e&&(s=t=e=!0);let i=await y(l,o,{cmdName:"wc",stopOnError:!1});if(o.length===0){let f=b(i.files[0].content);return{stdout:`${h(f,s,t,e,"")}
2
+ `,stderr:"",exitCode:0}}let c="",u=0,d=0,p=0;for(let{filename:f,content:x}of i.files){let a=b(x);u+=a.lines,d+=a.words,p+=a.chars,c+=`${h(a,s,t,e,f)}
3
+ `}return o.length>1&&(c+=`${h({lines:u,words:d,chars:p},s,t,e,"total")}
4
+ `),{stdout:c,stderr:i.stderr,exitCode:i.exitCode}}};function b(n){let l=n.length,r=0,s=0,t=!1;for(let e=0;e<l;e++){let o=n[e];o===`
5
+ `?(r++,t&&(s++,t=!1)):o===" "||o===" "||o==="\r"?t&&(s++,t=!1):t=!0}return t&&s++,{lines:r,words:s,chars:l}}function h(n,l,r,s,t){let e=[];l&&e.push(String(n.lines)),r&&e.push(String(n.words)),s&&e.push(String(n.chars));let o=e.join(" ");return t&&(o+=` ${t}`),o}export{L as wcCommand};
@@ -0,0 +1,2 @@
1
+ import{a as u}from"./chunk-ZVV5VXYZ.js";import{a as f,b as h}from"./chunk-74CEPOFO.js";import"./chunk-2RUN43TJ.js";var w={name:"which",summary:"locate a command",usage:"which [-as] program ...",options:["-a List all instances of executables found","-s No output, just return 0 if found, 1 if not","--help display this help and exit"]},g={showAll:{short:"a",type:"boolean"},silent:{short:"s",type:"boolean"}},A={name:"which",async execute(s,e){if(h(s))return f(w);let t=u("which",s,g);if(!t.ok)return t.error;let c=t.result.flags.showAll,p=t.result.flags.silent,o=t.result.positional;if(o.length===0)return{stdout:"",stderr:"",exitCode:1};let d=(e.env.PATH||"/bin:/usr/bin").split(":"),n="",r=!0;for(let m of o){let a=!1;for(let i of d){if(!i)continue;let l=`${i}/${m}`;if(await e.fs.exists(l)&&(a=!0,p||(n+=`${l}
2
+ `),!c))break}a||(r=!1)}return{stdout:n,stderr:"",exitCode:r?0:1}}};export{A as whichCommand};
@@ -0,0 +1,3 @@
1
+ import{a as b,b as A,c as y}from"./chunk-74CEPOFO.js";import"./chunk-2RUN43TJ.js";var N={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},E={name:"xargs",async execute(n,u){if(A(n))return b(N);let h=null,c=null,l=null,x=!1,g=!1,C=!1,r=0;for(let t=0;t<n.length;t++){let e=n[t];if(e==="-I"&&t+1<n.length)h=n[++t],r=t+1;else if(e==="-n"&&t+1<n.length)c=parseInt(n[++t],10),r=t+1;else if(e==="-P"&&t+1<n.length)l=parseInt(n[++t],10),r=t+1;else if(e==="-0"||e==="--null")x=!0,r=t+1;else if(e==="-t"||e==="--verbose")g=!0,r=t+1;else if(e==="-r"||e==="--no-run-if-empty")C=!0,r=t+1;else{if(e.startsWith("--"))return y("xargs",e);if(e.startsWith("-")&&e.length>1){for(let f of e.slice(1))if(!"0trnIP".includes(f))return y("xargs",`-${f}`);e.includes("0")&&(x=!0),e.includes("t")&&(g=!0),e.includes("r")&&(C=!0),r=t+1}else if(!e.startsWith("-")){r=t;break}}}let o=n.slice(r);o.length===0&&o.push("echo");let P=x?"\0":/\s+/,i=u.stdin.split(P).map(t=>t.trim()).filter(t=>t.length>0);if(i.length===0)return C?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};let d="",a="",m=0,w=async t=>{let e=t.join(" ");return g&&(a+=`${e}
2
+ `),u.exec?u.exec(e,{cwd:u.cwd}):{stdout:`${e}
3
+ `,stderr:"",exitCode:0}},I=async t=>{if(l!==null&&l>1)for(let e=0;e<t.length;e+=l){let s=t.slice(e,e+l),f=await Promise.all(s.map(w));for(let p of f)d+=p.stdout,a+=p.stderr,p.exitCode!==0&&(m=p.exitCode)}else for(let e of t){let s=await w(e);d+=s.stdout,a+=s.stderr,s.exitCode!==0&&(m=s.exitCode)}};if(h!==null){let t=i.map(e=>o.map(s=>s.replaceAll(h,e)));await I(t)}else if(c!==null){let t=[];for(let e=0;e<i.length;e+=c){let s=i.slice(e,e+c);t.push([...o,...s])}await I(t)}else{let t=[...o,...i],e=await w(t);d+=e.stdout,a+=e.stderr,m=e.exitCode}return{stdout:d,stderr:a,exitCode:m}}};export{E as xargsCommand};
@@ -0,0 +1,3 @@
1
+ import{a as b,b as A,c as w}from"./chunk-74CEPOFO.js";import"./chunk-2RUN43TJ.js";var P={name:"xargs",summary:"build and execute command lines from standard input",usage:"xargs [OPTION]... [COMMAND [INITIAL-ARGS]]",options:["-I REPLACE replace occurrences of REPLACE with input","-n NUM use at most NUM arguments per command line","-P NUM run at most NUM processes at a time","-0, --null items are separated by null, not whitespace","-t, --verbose print commands before executing","-r, --no-run-if-empty do not run command if input is empty"," --help display this help and exit"]},E={name:"xargs",async execute(n,u){if(A(n))return b(P);let p=null,c=null,l=null,h=!1,x=!1,g=!1,r=0;for(let t=0;t<n.length;t++){let e=n[t];if(e==="-I"&&t+1<n.length)p=n[++t],r=t+1;else if(e==="-n"&&t+1<n.length)c=parseInt(n[++t],10),r=t+1;else if(e==="-P"&&t+1<n.length)l=parseInt(n[++t],10),r=t+1;else if(e==="-0"||e==="--null")h=!0,r=t+1;else if(e==="-t"||e==="--verbose")x=!0,r=t+1;else if(e==="-r"||e==="--no-run-if-empty")g=!0,r=t+1;else{if(e.startsWith("--"))return w("xargs",e);if(e.startsWith("-")&&e.length>1){for(let s of e.slice(1))if(!"0tr".includes(s))return w("xargs",`-${s}`);e.includes("0")&&(h=!0),e.includes("t")&&(x=!0),e.includes("r")&&(g=!0),r=t+1}else if(!e.startsWith("-")){r=t;break}}}let o=n.slice(r);o.length===0&&o.push("echo");let I=h?"\0":/\s+/,i=u.stdin.split(I).map(t=>t.trim()).filter(t=>t.length>0);if(i.length===0)return g?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:"",exitCode:0};let d="",a="",m=0,C=async t=>{let e=t.join(" ");return x&&(a+=`${e}
2
+ `),u.exec?u.exec(e,{cwd:u.cwd}):{stdout:`${e}
3
+ `,stderr:"",exitCode:0}},y=async t=>{if(l!==null&&l>1)for(let e=0;e<t.length;e+=l){let s=t.slice(e,e+l),N=await Promise.all(s.map(C));for(let f of N)d+=f.stdout,a+=f.stderr,f.exitCode!==0&&(m=f.exitCode)}else for(let e of t){let s=await C(e);d+=s.stdout,a+=s.stderr,s.exitCode!==0&&(m=s.exitCode)}};if(p!==null){let t=i.map(e=>o.map(s=>s.replaceAll(p,e)));await y(t)}else if(c!==null){let t=[];for(let e=0;e<i.length;e+=c){let s=i.slice(e,e+c);t.push([...o,...s])}await y(t)}else{let t=[...o,...i],e=await C(t);d+=e.stdout,a+=e.stderr,m=e.exitCode}return{stdout:d,stderr:a,exitCode:m}}};export{E as xargsCommand};
@@ -1,4 +1,4 @@
1
- import{a as U,b as X,c as V,d as te,e as Y,f as k,g as F,h as Ee,i as z,j as fe,k as Ve}from"./chunks/chunk-CG2HXOFG.js";import{a as le}from"./chunks/chunk-44UOCSGV.js";var At=[{name:"echo",load:async()=>(await import("./chunks/echo-W2TA2N7Y.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-5KESXK2M.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-G2SBUNW3.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-B7C35UDO.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-WYI2LJ6H.js")).mkdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-Z5XRYFYY.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-5X2XSQQ6.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-BLHAPLQZ.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-GN23UIZU.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-UTUVIAFP.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-VLKWIL3N.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-ZVX5RTL4.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-HHC33N5C.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-7H5R4WKO.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-BLGGG2VX.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-OXLYBRUE.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-TM5F5YO4.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-CZTYKNEE.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-CZTYKNEE.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-CZTYKNEE.js")).egrepCommand},{name:"sed",load:async()=>(await import("./chunks/sed-IGVS3UIY.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-4YCQ6UCB.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-LHMQWYH2.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-IIOQKNTS.js")).uniqCommand},{name:"cut",load:async()=>(await import("./chunks/cut-7RHEYJ7Y.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-L4TYPVSP.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-UV4V27RJ.js")).trCommand},{name:"tee",load:async()=>(await import("./chunks/tee-VCNOG5VI.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-522XP4ZY.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-SB5JXIY3.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-Q5HDZLH2.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-75UXQ4XJ.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-I5HYAKTQ.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-2F2VHNYS.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-2F2VHNYS.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-7ZSTROM7.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-7ZSTROM7.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-7Z2STZ6Y.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-752VENJT.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-OD7ZXH3O.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-OD7ZXH3O.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-ZBD2DMXN.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-5WG5RD6L.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-5WG5RD6L.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-7R2XGLLH.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-WATI5PWI.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-IVJFQANX.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-YOOSNZVA.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-QJBQD6VS.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-VG2N46UR.js")).timeoutCommand},{name:"seq",load:async()=>(await import("./chunks/seq-TFPZQZPJ.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-A4LJAGVP.js")).exprCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-XMBYO6FD.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-XHGUXTV3.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-ONWH3TNF.js")).whichCommand}],yr=[{name:"curl",load:async()=>(await import("./chunks/curl-PA2MWGKN.js")).curlCommand}],pr=new Map;function Er(t){return{name:t.name,async execute(e,s){let r=pr.get(t.name);return r||(r=await t.load(),pr.set(t.name,r)),r.execute(e,s)}}}function Ts(){return At.map(t=>t.name)}function Ws(){return yr.map(t=>t.name)}function wr(t){return(t?At.filter(s=>t.includes(s.name)):At).map(Er)}function gr(){return yr.map(Er)}function Ar(t){return"load"in t&&typeof t.load=="function"}function Fs(t,e){return{name:t,execute:e}}function xr(t){let e=null;return{name:t.name,async execute(s,r){return e||(e=await t.load()),e.execute(s,r)}}}var Ms=new TextEncoder,Bs=new TextDecoder;function re(t,e){if(t instanceof Uint8Array)return t;switch(e){case"base64":return Uint8Array.from(atob(t),s=>s.charCodeAt(0));case"hex":{let s=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)s[r/2]=parseInt(t.slice(r,r+2),16);return s}case"binary":case"latin1":return Uint8Array.from(t,s=>s.charCodeAt(0));default:return Ms.encode(t)}}function Se(t,e){switch(e){case"base64":return btoa(String.fromCharCode(...t));case"hex":return Array.from(t).map(s=>s.toString(16).padStart(2,"0")).join("");case"binary":case"latin1":return String.fromCharCode(...t);default:return Bs.decode(t)}}function Z(t){if(t!=null)return typeof t=="string"?t:t.encoding??void 0}var Ge=new TextEncoder;function zs(t){return typeof t=="object"&&t!==null&&!(t instanceof Uint8Array)&&"content"in t}var se=class{data=new Map;constructor(e){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),e)for(let[s,r]of Object.entries(e))zs(r)?this.writeFileSync(s,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(s,r)}normalizePath(e){if(!e||e==="/")return"/";let s=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;s.startsWith("/")||(s=`/${s}`);let r=s.split("/").filter(o=>o&&o!=="."),n=[];for(let o of r)o===".."?n.pop():n.push(o);return`/${n.join("/")}`||"/"}dirname(e){let s=this.normalizePath(e);if(s==="/")return"/";let r=s.lastIndexOf("/");return r===0?"/":s.slice(0,r)}ensureParentDirs(e){let s=this.dirname(e);s!=="/"&&(this.data.has(s)||(this.ensureParentDirs(s),this.data.set(s,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(e,s,r,n){let o=this.normalizePath(e);this.ensureParentDirs(o);let i=Z(r),a=re(s,i);this.data.set(o,{type:"file",content:a,mode:n?.mode??420,mtime:n?.mtime??new Date})}async readFile(e,s){let r=await this.readFileBuffer(e),n=Z(s);return Se(r,n)}async readFileBuffer(e){let s=this.normalizePath(e),r=this.data.get(s),n=s;if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);let o=new Set;for(;r&&r.type==="symlink";){if(o.has(n))throw new Error(`ELOOP: too many levels of symbolic links, open '${e}'`);o.add(n),n=this.resolveSymlink(n,r.target),r=this.data.get(n)}if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${e}'`);return r.content instanceof Uint8Array?r.content:Ge.encode(r.content)}async writeFile(e,s,r){this.writeFileSync(e,s,r)}async appendFile(e,s,r){let n=this.normalizePath(e),o=this.data.get(n);if(o&&o.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${e}'`);let i=Z(r),a=re(s,i);if(o?.type==="file"){let l=o.content instanceof Uint8Array?o.content:Ge.encode(o.content),c=new Uint8Array(l.length+a.length);c.set(l),c.set(a,l.length),this.data.set(n,{type:"file",content:c,mode:o.mode,mtime:new Date})}else this.writeFileSync(e,s,r)}async exists(e){return this.data.has(this.normalizePath(e))}async stat(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);if(r.type==="symlink"){let o=this.resolveSymlink(s,r.target),i=this.data.get(o);if(!i)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);r=i}let n=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=Ge.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}async lstat(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${e}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};let n=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=Ge.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}resolveSymlink(e,s){if(s.startsWith("/"))return this.normalizePath(s);let r=this.dirname(e);return this.normalizePath(r==="/"?`/${s}`:`${r}/${s}`)}async mkdir(e,s){this.mkdirSync(e,s)}mkdirSync(e,s){let r=this.normalizePath(e);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${e}'`);if(!s?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${e}'`);return}let n=this.dirname(r);if(n!=="/"&&!this.data.has(n))if(s?.recursive)this.mkdirSync(n,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${e}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${e}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${e}'`);let n=s==="/"?"/":`${s}/`,o=[];for(let i of this.data.keys())if(i!==s&&i.startsWith(n)){let l=i.slice(n.length).split("/")[0];l&&!o.includes(l)&&o.push(l)}return o.sort()}async rm(e,s){let r=this.normalizePath(e),n=this.data.get(r);if(!n){if(s?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${e}'`)}if(n.type==="directory"){let o=await this.readdir(r);if(o.length>0){if(!s?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${e}'`);for(let i of o){let a=r==="/"?`/${i}`:`${r}/${i}`;await this.rm(a,s)}}}this.data.delete(r)}async cp(e,s,r){let n=this.normalizePath(e),o=this.normalizePath(s),i=this.data.get(n);if(!i)throw new Error(`ENOENT: no such file or directory, cp '${e}'`);if(i.type==="file")this.ensureParentDirs(o),this.data.set(o,{...i});else if(i.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${e}'`);await this.mkdir(o,{recursive:!0});let a=await this.readdir(n);for(let l of a){let c=n==="/"?`/${l}`:`${n}/${l}`,f=o==="/"?`/${l}`:`${o}/${l}`;await this.cp(c,f,r)}}}async mv(e,s){await this.cp(e,s,{recursive:!0}),await this.rm(e,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(e,s){if(s.startsWith("/"))return this.normalizePath(s);let r=e==="/"?`/${s}`:`${e}/${s}`;return this.normalizePath(r)}async chmod(e,s){let r=this.normalizePath(e),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, chmod '${e}'`);n.mode=s}async symlink(e,s){let r=this.normalizePath(s);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${s}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:e,mode:511,mtime:new Date})}async link(e,s){let r=this.normalizePath(e),n=this.normalizePath(s),o=this.data.get(r);if(!o)throw new Error(`ENOENT: no such file or directory, link '${e}'`);if(o.type!=="file")throw new Error(`EPERM: operation not permitted, link '${e}'`);if(this.data.has(n))throw new Error(`EEXIST: file already exists, link '${s}'`);this.ensureParentDirs(n),this.data.set(n,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${e}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${e}'`);return r.target}};function T(t,e){return{type:"ArithmeticExpression",expression:ne(t,e,0).expr}}function ne(t,e,s){return Us(t,e,s)}function Us(t,e,s){let{expr:r,pos:n}=je(t,e,s);for(n=O(e,n);e[n]===",";){n++;let{expr:o,pos:i}=je(t,e,n);r={type:"ArithBinary",operator:",",left:r,right:o},n=O(e,i)}return{expr:r,pos:n}}function je(t,e,s){let{expr:r,pos:n}=Vs(t,e,s);if(n=O(e,n),e[n]==="?"){n++;let{expr:o,pos:i}=ne(t,e,n);if(n=O(e,i),e[n]===":"){n++;let{expr:a,pos:l}=ne(t,e,n);return{expr:{type:"ArithTernary",condition:r,consequent:o,alternate:a},pos:l}}}return{expr:r,pos:n}}function Vs(t,e,s){let{expr:r,pos:n}=Sr(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="||";){n+=2;let{expr:o,pos:i}=Sr(t,e,n);r={type:"ArithBinary",operator:"||",left:r,right:o},n=i}return{expr:r,pos:n}}function Sr(t,e,s){let{expr:r,pos:n}=br(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="&&";){n+=2;let{expr:o,pos:i}=br(t,e,n);r={type:"ArithBinary",operator:"&&",left:r,right:o},n=i}return{expr:r,pos:n}}function br(t,e,s){let{expr:r,pos:n}=Nr(t,e,s);for(;n=O(e,n),e[n]==="|"&&e[n+1]!=="|";){n++;let{expr:o,pos:i}=Nr(t,e,n);r={type:"ArithBinary",operator:"|",left:r,right:o},n=i}return{expr:r,pos:n}}function Nr(t,e,s){let{expr:r,pos:n}=Cr(t,e,s);for(;n=O(e,n),e[n]==="^";){n++;let{expr:o,pos:i}=Cr(t,e,n);r={type:"ArithBinary",operator:"^",left:r,right:o},n=i}return{expr:r,pos:n}}function Cr(t,e,s){let{expr:r,pos:n}=$r(t,e,s);for(;n=O(e,n),e[n]==="&"&&e[n+1]!=="&";){n++;let{expr:o,pos:i}=$r(t,e,n);r={type:"ArithBinary",operator:"&",left:r,right:o},n=i}return{expr:r,pos:n}}function $r(t,e,s){let{expr:r,pos:n}=Pr(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="=="||e.slice(n,n+2)==="!=";){let o=e.slice(n,n+2);n+=2;let{expr:i,pos:a}=Pr(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}return{expr:r,pos:n}}function Pr(t,e,s){let{expr:r,pos:n}=xt(t,e,s);for(;;)if(n=O(e,n),e.slice(n,n+2)==="<="||e.slice(n,n+2)===">="){let o=e.slice(n,n+2);n+=2;let{expr:i,pos:a}=xt(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}else if(e[n]==="<"||e[n]===">"){let o=e[n];n++;let{expr:i,pos:a}=xt(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}else break;return{expr:r,pos:n}}function xt(t,e,s){let{expr:r,pos:n}=vr(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="<<"||e.slice(n,n+2)===">>";){let o=e.slice(n,n+2);n+=2;let{expr:i,pos:a}=vr(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}return{expr:r,pos:n}}function vr(t,e,s){let{expr:r,pos:n}=Ir(t,e,s);for(;n=O(e,n),(e[n]==="+"||e[n]==="-")&&e[n+1]!==e[n];){let o=e[n];n++;let{expr:i,pos:a}=Ir(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}return{expr:r,pos:n}}function Ir(t,e,s){let{expr:r,pos:n}=He(t,e,s);for(;;)if(n=O(e,n),e[n]==="*"&&e[n+1]!=="*"){n++;let{expr:o,pos:i}=He(t,e,n);r={type:"ArithBinary",operator:"*",left:r,right:o},n=i}else if(e[n]==="/"||e[n]==="%"){let o=e[n];n++;let{expr:i,pos:a}=He(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}else break;return{expr:r,pos:n}}function He(t,e,s){let{expr:r,pos:n}=St(t,e,s),o=O(e,n);if(e.slice(o,o+2)==="**"){o+=2;let{expr:i,pos:a}=He(t,e,o);return{expr:{type:"ArithBinary",operator:"**",left:r,right:i},pos:a}}return{expr:r,pos:n}}function St(t,e,s){let r=O(e,s);if(e.slice(r,r+2)==="++"||e.slice(r,r+2)==="--"){let n=e.slice(r,r+2);r+=2;let{expr:o,pos:i}=St(t,e,r);return{expr:{type:"ArithUnary",operator:n,operand:o,prefix:!0},pos:i}}if(e[r]==="+"||e[r]==="-"||e[r]==="!"||e[r]==="~"){let n=e[r];r++;let{expr:o,pos:i}=St(t,e,r);return{expr:{type:"ArithUnary",operator:n,operand:o,prefix:!0},pos:i}}return Hs(t,e,r)}function Gs(t,e){let s=t[e];return s==="$"||s==="`"}function Hs(t,e,s){let{expr:r,pos:n}=Rr(t,e,s),o=[r];for(;Gs(e,n);){let{expr:i,pos:a}=Rr(t,e,n);o.push(i),n=a}if(o.length>1&&(r={type:"ArithConcat",parts:o}),n=O(e,n),e.slice(n,n+2)==="++"||e.slice(n,n+2)==="--"){let i=e.slice(n,n+2);return n+=2,{expr:{type:"ArithUnary",operator:i,operand:r,prefix:!1},pos:n}}return{expr:r,pos:n}}function Rr(t,e,s){let r=O(e,s);if(e.slice(r,r+3)==="$(("){r+=3;let n=1,o=r;for(;r<e.length-1&&n>0;)e[r]==="("&&e[r+1]==="("?(n++,r+=2):e[r]===")"&&e[r+1]===")"?(n--,n>0&&(r+=2)):r++;let i=e.slice(o,r),{expr:a}=ne(t,i,0);return r+=2,{expr:{type:"ArithNested",expression:a},pos:r}}if(e.slice(r,r+2)==="$("&&e[r+2]!=="("){r+=2;let n=1,o=r;for(;r<e.length&&n>0;)e[r]==="("?n++:e[r]===")"&&n--,n>0&&r++;let i=e.slice(o,r);return r++,{expr:{type:"ArithCommandSubst",command:i},pos:r}}if(e[r]==="`"){r++;let n=r;for(;r<e.length&&e[r]!=="`";)r++;let o=e.slice(n,r);return e[r]==="`"&&r++,{expr:{type:"ArithCommandSubst",command:o},pos:r}}if(e[r]==="("){r++;let{expr:n,pos:o}=ne(t,e,r);return r=O(e,o),e[r]===")"&&r++,{expr:{type:"ArithGroup",expression:n},pos:r}}if(/[0-9]/.test(e[r])){let n="",o=!1;for(;r<e.length;){let a=e[r];if(o)if(/[0-9a-zA-Z@_]/.test(a))n+=a,r++;else break;else if(a==="#")o=!0,n+=a,r++;else if(/[0-9a-fA-FxX]/.test(a))n+=a,r++;else break}if(e[r]==="."&&/[0-9]/.test(e[r+1]))throw new F(`${n}.${e[r+1]}...: syntax error: invalid arithmetic operator`);if(e[r]==="["){let a=e.slice(r).trim();return{expr:{type:"ArithNumberSubscript",number:n,errorToken:a},pos:e.length}}return{expr:{type:"ArithNumber",value:be(n)},pos:r}}if(e[r]==="$"&&e[r+1]==="{"){let n=r+2,o=1,i=n;for(;i<e.length&&o>0;)e[i]==="{"?o++:e[i]==="}"&&o--,o>0&&i++;let a=e.slice(n,i),l=i+1;if(e[l]==="#"){let c=l+1;for(;c<e.length&&/[0-9a-zA-Z@_]/.test(e[c]);)c++;let f=e.slice(l+1,c);return{expr:{type:"ArithDynamicBase",baseExpr:a,value:f},pos:c}}if(/[0-9]/.test(e[l])||e[l]==="x"||e[l]==="X"){let c=l;if(e[l]==="x"||e[l]==="X")for(c++;c<e.length&&/[0-9a-fA-F]/.test(e[c]);)c++;else for(;c<e.length&&/[0-9]/.test(e[c]);)c++;let f=e.slice(l,c);return{expr:{type:"ArithDynamicNumber",prefix:a,suffix:f},pos:c}}return r=l,{expr:{type:"ArithBracedExpansion",content:a},pos:r}}if(e[r]==="$"&&r+1<e.length&&/[0-9]/.test(e[r+1])){r++;let n="";for(;r<e.length&&/[0-9]/.test(e[r]);)n+=e[r],r++;return{expr:{type:"ArithVariable",name:n},pos:r}}if(e[r]==="$"&&r+1<e.length&&/[a-zA-Z_]/.test(e[r+1])&&r++,/[a-zA-Z_]/.test(e[r])){let n="";for(;r<e.length&&/[a-zA-Z0-9_]/.test(e[r]);)n+=e[r],r++;if(e[r]==="["){r++;let i;if(e[r]==="'"||e[r]==='"'){let c=e[r];for(r++,i="";r<e.length&&e[r]!==c;)i+=e[r],r++;e[r]===c&&r++,r=O(e,r),e[r]==="]"&&r++}let a;if(i===void 0){let{expr:c,pos:f}=ne(t,e,r);a=c,r=f,e[r]==="]"&&r++}if(r=O(e,r),e[r]==="["&&a)return{expr:{type:"ArithDoubleSubscript",array:n,index:a},pos:r};let l=["=","+=","-=","*=","/=","%=","<<=",">>=","&=","|=","^="];for(let c of l)if(e.slice(r,r+c.length)===c&&e.slice(r,r+c.length+1)!=="=="){r+=c.length;let{expr:f,pos:h}=je(t,e,r);return{expr:{type:"ArithAssignment",operator:c,variable:n,subscript:a,stringKey:i,value:f},pos:h}}return{expr:{type:"ArithArrayElement",array:n,index:a,stringKey:i},pos:r}}r=O(e,r);let o=["=","+=","-=","*=","/=","%=","<<=",">>=","&=","|=","^="];for(let i of o)if(e.slice(r,r+i.length)===i&&e.slice(r,r+i.length+1)!=="=="){r+=i.length;let{expr:a,pos:l}=je(t,e,r);return{expr:{type:"ArithAssignment",operator:i,variable:n,value:a},pos:l}}return{expr:{type:"ArithVariable",name:n},pos:r}}return{expr:{type:"ArithNumber",value:0},pos:r}}function be(t){if(t.includes("#")){let[e,s]=t.split("#"),r=Number.parseInt(e,10);if(r<2||r>64)return Number.NaN;if(r<=36)return Number.parseInt(s,r);let n=0;for(let o of s){let i;if(o>="0"&&o<="9")i=o.charCodeAt(0)-48;else if(o>="a"&&o<="z")i=o.charCodeAt(0)-97+10;else if(o>="A"&&o<="Z")i=o.charCodeAt(0)-65+36;else if(o==="@")i=62;else if(o==="_")i=63;else return Number.NaN;if(i>=r)return Number.NaN;n=n*r+i}return n}return t.startsWith("0x")||t.startsWith("0X")?Number.parseInt(t.slice(2),16):t.startsWith("0")&&t.length>1&&/^[0-9]+$/.test(t)?/[89]/.test(t)?Number.NaN:Number.parseInt(t,8):Number.parseInt(t,10)}function O(t,e){for(;e<t.length;){if(t[e]==="\\"&&t[e+1]===`
1
+ import{a as U,b as X,c as V,d as te,e as Y,f as k,g as F,h as Ee,i as z,j as fe,k as Ve}from"./chunks/chunk-CG2HXOFG.js";import{a as le}from"./chunks/chunk-44UOCSGV.js";import"./chunks/chunk-2RUN43TJ.js";var At=[{name:"echo",load:async()=>(await import("./chunks/echo-WUKBESC7.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-47EP4IAV.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-HBP44PXI.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-JGYJQA2Y.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-HA2FJX4O.js")).mkdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-FOE745V2.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-NF3FNLAY.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-37OVLNLD.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-7I62SB3I.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-XFYHBIFL.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-XJXFAD4M.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-CEF235GL.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-MQIMKDSA.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-6PAUYCDP.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-QXKYHAML.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-GV5WUREX.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-FVFLDQGP.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-ZJVDG3FA.js")).egrepCommand},{name:"sed",load:async()=>(await import("./chunks/sed-H2RWPMTM.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-QWBT4IFJ.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-XODGFZC4.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-7PFWPNWK.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-KSJ4BBRQ.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-FIZRELKC.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-QBGVCQFT.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-LMLGE4IE.js")).trCommand},{name:"tee",load:async()=>(await import("./chunks/tee-W5HCCBPO.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-R6LJIRBI.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-5UVU5RXR.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-U2KVUSQY.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-WBUGLVP5.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-KRAFOIQK.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-MSPSPGCD.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-MSPSPGCD.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JFIUWFGE.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JFIUWFGE.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-SG6VRATI.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-NQBNFMCT.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-6LGCG4EY.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-6LGCG4EY.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-XD3TJRVQ.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-BASUPKHJ.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-BASUPKHJ.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-ABWUP4LV.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-TUA2XORD.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-GLRVCAKJ.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-NN5C354M.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-AFN3PHJW.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-XAA3N7CF.js")).timeoutCommand},{name:"seq",load:async()=>(await import("./chunks/seq-VKYIUOPJ.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-HYOCSWK6.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-PIH6F3O3.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-HVHNZSEC.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-REOOJORK.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-LQXX6P4Y.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-ZSZ34PAN.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-5E6PYJWQ.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-KHFYPBWW.js")).whichCommand}],yr=[{name:"curl",load:async()=>(await import("./chunks/curl-C43O5WQS.js")).curlCommand}],pr=new Map;function Er(t){return{name:t.name,async execute(e,s){let r=pr.get(t.name);return r||(r=await t.load(),pr.set(t.name,r)),r.execute(e,s)}}}function Ts(){return At.map(t=>t.name)}function Ws(){return yr.map(t=>t.name)}function wr(t){return(t?At.filter(s=>t.includes(s.name)):At).map(Er)}function gr(){return yr.map(Er)}function Ar(t){return"load"in t&&typeof t.load=="function"}function Fs(t,e){return{name:t,execute:e}}function xr(t){let e=null;return{name:t.name,async execute(s,r){return e||(e=await t.load()),e.execute(s,r)}}}var Ms=new TextEncoder,Bs=new TextDecoder;function re(t,e){if(t instanceof Uint8Array)return t;switch(e){case"base64":return Uint8Array.from(atob(t),s=>s.charCodeAt(0));case"hex":{let s=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)s[r/2]=parseInt(t.slice(r,r+2),16);return s}case"binary":case"latin1":return Uint8Array.from(t,s=>s.charCodeAt(0));default:return Ms.encode(t)}}function Se(t,e){switch(e){case"base64":return btoa(String.fromCharCode(...t));case"hex":return Array.from(t).map(s=>s.toString(16).padStart(2,"0")).join("");case"binary":case"latin1":return String.fromCharCode(...t);default:return Bs.decode(t)}}function Z(t){if(t!=null)return typeof t=="string"?t:t.encoding??void 0}var Ge=new TextEncoder;function zs(t){return typeof t=="object"&&t!==null&&!(t instanceof Uint8Array)&&"content"in t}var se=class{data=new Map;constructor(e){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),e)for(let[s,r]of Object.entries(e))zs(r)?this.writeFileSync(s,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(s,r)}normalizePath(e){if(!e||e==="/")return"/";let s=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;s.startsWith("/")||(s=`/${s}`);let r=s.split("/").filter(o=>o&&o!=="."),n=[];for(let o of r)o===".."?n.pop():n.push(o);return`/${n.join("/")}`||"/"}dirname(e){let s=this.normalizePath(e);if(s==="/")return"/";let r=s.lastIndexOf("/");return r===0?"/":s.slice(0,r)}ensureParentDirs(e){let s=this.dirname(e);s!=="/"&&(this.data.has(s)||(this.ensureParentDirs(s),this.data.set(s,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(e,s,r,n){let o=this.normalizePath(e);this.ensureParentDirs(o);let i=Z(r),a=re(s,i);this.data.set(o,{type:"file",content:a,mode:n?.mode??420,mtime:n?.mtime??new Date})}async readFile(e,s){let r=await this.readFileBuffer(e),n=Z(s);return Se(r,n)}async readFileBuffer(e){let s=this.normalizePath(e),r=this.data.get(s),n=s;if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);let o=new Set;for(;r&&r.type==="symlink";){if(o.has(n))throw new Error(`ELOOP: too many levels of symbolic links, open '${e}'`);o.add(n),n=this.resolveSymlink(n,r.target),r=this.data.get(n)}if(!r)throw new Error(`ENOENT: no such file or directory, open '${e}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${e}'`);return r.content instanceof Uint8Array?r.content:Ge.encode(r.content)}async writeFile(e,s,r){this.writeFileSync(e,s,r)}async appendFile(e,s,r){let n=this.normalizePath(e),o=this.data.get(n);if(o&&o.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${e}'`);let i=Z(r),a=re(s,i);if(o?.type==="file"){let l=o.content instanceof Uint8Array?o.content:Ge.encode(o.content),c=new Uint8Array(l.length+a.length);c.set(l),c.set(a,l.length),this.data.set(n,{type:"file",content:c,mode:o.mode,mtime:new Date})}else this.writeFileSync(e,s,r)}async exists(e){return this.data.has(this.normalizePath(e))}async stat(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);if(r.type==="symlink"){let o=this.resolveSymlink(s,r.target),i=this.data.get(o);if(!i)throw new Error(`ENOENT: no such file or directory, stat '${e}'`);r=i}let n=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=Ge.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}async lstat(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${e}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};let n=0;return r.type==="file"&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=Ge.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}resolveSymlink(e,s){if(s.startsWith("/"))return this.normalizePath(s);let r=this.dirname(e);return this.normalizePath(r==="/"?`/${s}`:`${r}/${s}`)}async mkdir(e,s){this.mkdirSync(e,s)}mkdirSync(e,s){let r=this.normalizePath(e);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${e}'`);if(!s?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${e}'`);return}let n=this.dirname(r);if(n!=="/"&&!this.data.has(n))if(s?.recursive)this.mkdirSync(n,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${e}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${e}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${e}'`);let n=s==="/"?"/":`${s}/`,o=[];for(let i of this.data.keys())if(i!==s&&i.startsWith(n)){let l=i.slice(n.length).split("/")[0];l&&!o.includes(l)&&o.push(l)}return o.sort()}async rm(e,s){let r=this.normalizePath(e),n=this.data.get(r);if(!n){if(s?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${e}'`)}if(n.type==="directory"){let o=await this.readdir(r);if(o.length>0){if(!s?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${e}'`);for(let i of o){let a=r==="/"?`/${i}`:`${r}/${i}`;await this.rm(a,s)}}}this.data.delete(r)}async cp(e,s,r){let n=this.normalizePath(e),o=this.normalizePath(s),i=this.data.get(n);if(!i)throw new Error(`ENOENT: no such file or directory, cp '${e}'`);if(i.type==="file")this.ensureParentDirs(o),this.data.set(o,{...i});else if(i.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${e}'`);await this.mkdir(o,{recursive:!0});let a=await this.readdir(n);for(let l of a){let c=n==="/"?`/${l}`:`${n}/${l}`,f=o==="/"?`/${l}`:`${o}/${l}`;await this.cp(c,f,r)}}}async mv(e,s){await this.cp(e,s,{recursive:!0}),await this.rm(e,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(e,s){if(s.startsWith("/"))return this.normalizePath(s);let r=e==="/"?`/${s}`:`${e}/${s}`;return this.normalizePath(r)}async chmod(e,s){let r=this.normalizePath(e),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, chmod '${e}'`);n.mode=s}async symlink(e,s){let r=this.normalizePath(s);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${s}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:e,mode:511,mtime:new Date})}async link(e,s){let r=this.normalizePath(e),n=this.normalizePath(s),o=this.data.get(r);if(!o)throw new Error(`ENOENT: no such file or directory, link '${e}'`);if(o.type!=="file")throw new Error(`EPERM: operation not permitted, link '${e}'`);if(this.data.has(n))throw new Error(`EEXIST: file already exists, link '${s}'`);this.ensureParentDirs(n),this.data.set(n,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(e){let s=this.normalizePath(e),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${e}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${e}'`);return r.target}};function T(t,e){return{type:"ArithmeticExpression",expression:ne(t,e,0).expr}}function ne(t,e,s){return Us(t,e,s)}function Us(t,e,s){let{expr:r,pos:n}=je(t,e,s);for(n=O(e,n);e[n]===",";){n++;let{expr:o,pos:i}=je(t,e,n);r={type:"ArithBinary",operator:",",left:r,right:o},n=O(e,i)}return{expr:r,pos:n}}function je(t,e,s){let{expr:r,pos:n}=Vs(t,e,s);if(n=O(e,n),e[n]==="?"){n++;let{expr:o,pos:i}=ne(t,e,n);if(n=O(e,i),e[n]===":"){n++;let{expr:a,pos:l}=ne(t,e,n);return{expr:{type:"ArithTernary",condition:r,consequent:o,alternate:a},pos:l}}}return{expr:r,pos:n}}function Vs(t,e,s){let{expr:r,pos:n}=Sr(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="||";){n+=2;let{expr:o,pos:i}=Sr(t,e,n);r={type:"ArithBinary",operator:"||",left:r,right:o},n=i}return{expr:r,pos:n}}function Sr(t,e,s){let{expr:r,pos:n}=br(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="&&";){n+=2;let{expr:o,pos:i}=br(t,e,n);r={type:"ArithBinary",operator:"&&",left:r,right:o},n=i}return{expr:r,pos:n}}function br(t,e,s){let{expr:r,pos:n}=Nr(t,e,s);for(;n=O(e,n),e[n]==="|"&&e[n+1]!=="|";){n++;let{expr:o,pos:i}=Nr(t,e,n);r={type:"ArithBinary",operator:"|",left:r,right:o},n=i}return{expr:r,pos:n}}function Nr(t,e,s){let{expr:r,pos:n}=Cr(t,e,s);for(;n=O(e,n),e[n]==="^";){n++;let{expr:o,pos:i}=Cr(t,e,n);r={type:"ArithBinary",operator:"^",left:r,right:o},n=i}return{expr:r,pos:n}}function Cr(t,e,s){let{expr:r,pos:n}=$r(t,e,s);for(;n=O(e,n),e[n]==="&"&&e[n+1]!=="&";){n++;let{expr:o,pos:i}=$r(t,e,n);r={type:"ArithBinary",operator:"&",left:r,right:o},n=i}return{expr:r,pos:n}}function $r(t,e,s){let{expr:r,pos:n}=Pr(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="=="||e.slice(n,n+2)==="!=";){let o=e.slice(n,n+2);n+=2;let{expr:i,pos:a}=Pr(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}return{expr:r,pos:n}}function Pr(t,e,s){let{expr:r,pos:n}=xt(t,e,s);for(;;)if(n=O(e,n),e.slice(n,n+2)==="<="||e.slice(n,n+2)===">="){let o=e.slice(n,n+2);n+=2;let{expr:i,pos:a}=xt(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}else if(e[n]==="<"||e[n]===">"){let o=e[n];n++;let{expr:i,pos:a}=xt(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}else break;return{expr:r,pos:n}}function xt(t,e,s){let{expr:r,pos:n}=vr(t,e,s);for(;n=O(e,n),e.slice(n,n+2)==="<<"||e.slice(n,n+2)===">>";){let o=e.slice(n,n+2);n+=2;let{expr:i,pos:a}=vr(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}return{expr:r,pos:n}}function vr(t,e,s){let{expr:r,pos:n}=Ir(t,e,s);for(;n=O(e,n),(e[n]==="+"||e[n]==="-")&&e[n+1]!==e[n];){let o=e[n];n++;let{expr:i,pos:a}=Ir(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}return{expr:r,pos:n}}function Ir(t,e,s){let{expr:r,pos:n}=He(t,e,s);for(;;)if(n=O(e,n),e[n]==="*"&&e[n+1]!=="*"){n++;let{expr:o,pos:i}=He(t,e,n);r={type:"ArithBinary",operator:"*",left:r,right:o},n=i}else if(e[n]==="/"||e[n]==="%"){let o=e[n];n++;let{expr:i,pos:a}=He(t,e,n);r={type:"ArithBinary",operator:o,left:r,right:i},n=a}else break;return{expr:r,pos:n}}function He(t,e,s){let{expr:r,pos:n}=St(t,e,s),o=O(e,n);if(e.slice(o,o+2)==="**"){o+=2;let{expr:i,pos:a}=He(t,e,o);return{expr:{type:"ArithBinary",operator:"**",left:r,right:i},pos:a}}return{expr:r,pos:n}}function St(t,e,s){let r=O(e,s);if(e.slice(r,r+2)==="++"||e.slice(r,r+2)==="--"){let n=e.slice(r,r+2);r+=2;let{expr:o,pos:i}=St(t,e,r);return{expr:{type:"ArithUnary",operator:n,operand:o,prefix:!0},pos:i}}if(e[r]==="+"||e[r]==="-"||e[r]==="!"||e[r]==="~"){let n=e[r];r++;let{expr:o,pos:i}=St(t,e,r);return{expr:{type:"ArithUnary",operator:n,operand:o,prefix:!0},pos:i}}return Hs(t,e,r)}function Gs(t,e){let s=t[e];return s==="$"||s==="`"}function Hs(t,e,s){let{expr:r,pos:n}=Rr(t,e,s),o=[r];for(;Gs(e,n);){let{expr:i,pos:a}=Rr(t,e,n);o.push(i),n=a}if(o.length>1&&(r={type:"ArithConcat",parts:o}),n=O(e,n),e.slice(n,n+2)==="++"||e.slice(n,n+2)==="--"){let i=e.slice(n,n+2);return n+=2,{expr:{type:"ArithUnary",operator:i,operand:r,prefix:!1},pos:n}}return{expr:r,pos:n}}function Rr(t,e,s){let r=O(e,s);if(e.slice(r,r+3)==="$(("){r+=3;let n=1,o=r;for(;r<e.length-1&&n>0;)e[r]==="("&&e[r+1]==="("?(n++,r+=2):e[r]===")"&&e[r+1]===")"?(n--,n>0&&(r+=2)):r++;let i=e.slice(o,r),{expr:a}=ne(t,i,0);return r+=2,{expr:{type:"ArithNested",expression:a},pos:r}}if(e.slice(r,r+2)==="$("&&e[r+2]!=="("){r+=2;let n=1,o=r;for(;r<e.length&&n>0;)e[r]==="("?n++:e[r]===")"&&n--,n>0&&r++;let i=e.slice(o,r);return r++,{expr:{type:"ArithCommandSubst",command:i},pos:r}}if(e[r]==="`"){r++;let n=r;for(;r<e.length&&e[r]!=="`";)r++;let o=e.slice(n,r);return e[r]==="`"&&r++,{expr:{type:"ArithCommandSubst",command:o},pos:r}}if(e[r]==="("){r++;let{expr:n,pos:o}=ne(t,e,r);return r=O(e,o),e[r]===")"&&r++,{expr:{type:"ArithGroup",expression:n},pos:r}}if(/[0-9]/.test(e[r])){let n="",o=!1;for(;r<e.length;){let a=e[r];if(o)if(/[0-9a-zA-Z@_]/.test(a))n+=a,r++;else break;else if(a==="#")o=!0,n+=a,r++;else if(/[0-9a-fA-FxX]/.test(a))n+=a,r++;else break}if(e[r]==="."&&/[0-9]/.test(e[r+1]))throw new F(`${n}.${e[r+1]}...: syntax error: invalid arithmetic operator`);if(e[r]==="["){let a=e.slice(r).trim();return{expr:{type:"ArithNumberSubscript",number:n,errorToken:a},pos:e.length}}return{expr:{type:"ArithNumber",value:be(n)},pos:r}}if(e[r]==="$"&&e[r+1]==="{"){let n=r+2,o=1,i=n;for(;i<e.length&&o>0;)e[i]==="{"?o++:e[i]==="}"&&o--,o>0&&i++;let a=e.slice(n,i),l=i+1;if(e[l]==="#"){let c=l+1;for(;c<e.length&&/[0-9a-zA-Z@_]/.test(e[c]);)c++;let f=e.slice(l+1,c);return{expr:{type:"ArithDynamicBase",baseExpr:a,value:f},pos:c}}if(/[0-9]/.test(e[l])||e[l]==="x"||e[l]==="X"){let c=l;if(e[l]==="x"||e[l]==="X")for(c++;c<e.length&&/[0-9a-fA-F]/.test(e[c]);)c++;else for(;c<e.length&&/[0-9]/.test(e[c]);)c++;let f=e.slice(l,c);return{expr:{type:"ArithDynamicNumber",prefix:a,suffix:f},pos:c}}return r=l,{expr:{type:"ArithBracedExpansion",content:a},pos:r}}if(e[r]==="$"&&r+1<e.length&&/[0-9]/.test(e[r+1])){r++;let n="";for(;r<e.length&&/[0-9]/.test(e[r]);)n+=e[r],r++;return{expr:{type:"ArithVariable",name:n},pos:r}}if(e[r]==="$"&&r+1<e.length&&/[a-zA-Z_]/.test(e[r+1])&&r++,/[a-zA-Z_]/.test(e[r])){let n="";for(;r<e.length&&/[a-zA-Z0-9_]/.test(e[r]);)n+=e[r],r++;if(e[r]==="["){r++;let i;if(e[r]==="'"||e[r]==='"'){let c=e[r];for(r++,i="";r<e.length&&e[r]!==c;)i+=e[r],r++;e[r]===c&&r++,r=O(e,r),e[r]==="]"&&r++}let a;if(i===void 0){let{expr:c,pos:f}=ne(t,e,r);a=c,r=f,e[r]==="]"&&r++}if(r=O(e,r),e[r]==="["&&a)return{expr:{type:"ArithDoubleSubscript",array:n,index:a},pos:r};let l=["=","+=","-=","*=","/=","%=","<<=",">>=","&=","|=","^="];for(let c of l)if(e.slice(r,r+c.length)===c&&e.slice(r,r+c.length+1)!=="=="){r+=c.length;let{expr:f,pos:h}=je(t,e,r);return{expr:{type:"ArithAssignment",operator:c,variable:n,subscript:a,stringKey:i,value:f},pos:h}}return{expr:{type:"ArithArrayElement",array:n,index:a,stringKey:i},pos:r}}r=O(e,r);let o=["=","+=","-=","*=","/=","%=","<<=",">>=","&=","|=","^="];for(let i of o)if(e.slice(r,r+i.length)===i&&e.slice(r,r+i.length+1)!=="=="){r+=i.length;let{expr:a,pos:l}=je(t,e,r);return{expr:{type:"ArithAssignment",operator:i,variable:n,value:a},pos:l}}return{expr:{type:"ArithVariable",name:n},pos:r}}return{expr:{type:"ArithNumber",value:0},pos:r}}function be(t){if(t.includes("#")){let[e,s]=t.split("#"),r=Number.parseInt(e,10);if(r<2||r>64)return Number.NaN;if(r<=36)return Number.parseInt(s,r);let n=0;for(let o of s){let i;if(o>="0"&&o<="9")i=o.charCodeAt(0)-48;else if(o>="a"&&o<="z")i=o.charCodeAt(0)-97+10;else if(o>="A"&&o<="Z")i=o.charCodeAt(0)-65+36;else if(o==="@")i=62;else if(o==="_")i=63;else return Number.NaN;if(i>=r)return Number.NaN;n=n*r+i}return n}return t.startsWith("0x")||t.startsWith("0X")?Number.parseInt(t.slice(2),16):t.startsWith("0")&&t.length>1&&/^[0-9]+$/.test(t)?/[89]/.test(t)?Number.NaN:Number.parseInt(t,8):Number.parseInt(t,10)}function O(t,e){for(;e<t.length;){if(t[e]==="\\"&&t[e+1]===`
2
2
  `){e+=2;continue}if(/\s/.test(t[e])){e++;continue}break}return e}var A={script(t){return{type:"Script",statements:t}},statement(t,e=[],s=!1){return{type:"Statement",pipelines:t,operators:e,background:s}},pipeline(t,e=!1){return{type:"Pipeline",commands:t,negated:e}},simpleCommand(t,e=[],s=[],r=[]){return{type:"SimpleCommand",name:t,args:e,assignments:s,redirections:r}},word(t){return{type:"Word",parts:t}},literal(t){return{type:"Literal",value:t}},singleQuoted(t){return{type:"SingleQuoted",value:t}},doubleQuoted(t){return{type:"DoubleQuoted",parts:t}},escaped(t){return{type:"Escaped",value:t}},parameterExpansion(t,e=null){return{type:"ParameterExpansion",parameter:t,operation:e}},commandSubstitution(t,e=!1){return{type:"CommandSubstitution",body:t,legacy:e}},arithmeticExpansion(t){return{type:"ArithmeticExpansion",expression:t}},assignment(t,e,s=!1,r=null){return{type:"Assignment",name:t,value:e,append:s,array:r}},redirection(t,e,s=null){return{type:"Redirection",fd:s,operator:t,target:e}},hereDoc(t,e,s=!1,r=!1){return{type:"HereDoc",delimiter:t,content:e,stripTabs:s,quoted:r}},ifNode(t,e=null,s=[]){return{type:"If",clauses:t,elseBody:e,redirections:s}},forNode(t,e,s,r=[]){return{type:"For",variable:t,words:e,body:s,redirections:r}},whileNode(t,e,s=[]){return{type:"While",condition:t,body:e,redirections:s}},untilNode(t,e,s=[]){return{type:"Until",condition:t,body:e,redirections:s}},caseNode(t,e,s=[]){return{type:"Case",word:t,items:e,redirections:s}},caseItem(t,e,s=";;"){return{type:"CaseItem",patterns:t,body:e,terminator:s}},subshell(t,e=[]){return{type:"Subshell",body:t,redirections:e}},group(t,e=[]){return{type:"Group",body:t,redirections:e}},functionDef(t,e,s=[]){return{type:"FunctionDef",name:t,body:e,redirections:s}},conditionalCommand(t,e=[]){return{type:"ConditionalCommand",expression:t,redirections:e}},arithmeticCommand(t,e=[]){return{type:"ArithmeticCommand",expression:t,redirections:e}}};var u;(function(t){t.EOF="EOF",t.NEWLINE="NEWLINE",t.SEMICOLON="SEMICOLON",t.AMP="AMP",t.PIPE="PIPE",t.PIPE_AMP="PIPE_AMP",t.AND_AND="AND_AND",t.OR_OR="OR_OR",t.BANG="BANG",t.LESS="LESS",t.GREAT="GREAT",t.DLESS="DLESS",t.DGREAT="DGREAT",t.LESSAND="LESSAND",t.GREATAND="GREATAND",t.LESSGREAT="LESSGREAT",t.DLESSDASH="DLESSDASH",t.CLOBBER="CLOBBER",t.TLESS="TLESS",t.AND_GREAT="AND_GREAT",t.AND_DGREAT="AND_DGREAT",t.LPAREN="LPAREN",t.RPAREN="RPAREN",t.LBRACE="LBRACE",t.RBRACE="RBRACE",t.DSEMI="DSEMI",t.SEMI_AND="SEMI_AND",t.SEMI_SEMI_AND="SEMI_SEMI_AND",t.DBRACK_START="DBRACK_START",t.DBRACK_END="DBRACK_END",t.DPAREN_START="DPAREN_START",t.DPAREN_END="DPAREN_END",t.IF="IF",t.THEN="THEN",t.ELSE="ELSE",t.ELIF="ELIF",t.FI="FI",t.FOR="FOR",t.WHILE="WHILE",t.UNTIL="UNTIL",t.DO="DO",t.DONE="DONE",t.CASE="CASE",t.ESAC="ESAC",t.IN="IN",t.FUNCTION="FUNCTION",t.SELECT="SELECT",t.TIME="TIME",t.COPROC="COPROC",t.WORD="WORD",t.NAME="NAME",t.NUMBER="NUMBER",t.ASSIGNMENT_WORD="ASSIGNMENT_WORD",t.COMMENT="COMMENT",t.HEREDOC_CONTENT="HEREDOC_CONTENT"})(u||(u={}));var Ze={if:u.IF,then:u.THEN,else:u.ELSE,elif:u.ELIF,fi:u.FI,for:u.FOR,while:u.WHILE,until:u.UNTIL,do:u.DO,done:u.DONE,case:u.CASE,esac:u.ESAC,in:u.IN,function:u.FUNCTION,select:u.SELECT,time:u.TIME,coproc:u.COPROC};function Dr(t){let e=t.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(!e)return!1;let s=t.slice(e[0].length);if(s===""||s==="+")return!0;if(s[0]==="["){let r=0,n=0;for(;n<s.length;n++)if(s[n]==="[")r++;else if(s[n]==="]"&&(r--,r===0))break;if(r!==0||n>=s.length)return!1;let o=s.slice(n+1);return o===""||o==="+"}return!1}var js=[[";",";","&",u.SEMI_SEMI_AND],["<","<","<",u.TLESS],["&",">",">",u.AND_DGREAT]],Zs=[["[","[",u.DBRACK_START],["]","]",u.DBRACK_END],["(","(",u.DPAREN_START],[")",")",u.DPAREN_END],["&","&",u.AND_AND],["|","|",u.OR_OR],[";",";",u.DSEMI],[";","&",u.SEMI_AND],["|","&",u.PIPE_AMP],[">",">",u.DGREAT],["<","&",u.LESSAND],[">","&",u.GREATAND],["<",">",u.LESSGREAT],[">","|",u.CLOBBER],["&",">",u.AND_GREAT]],qs={"|":u.PIPE,"&":u.AMP,";":u.SEMICOLON,"(":u.LPAREN,")":u.RPAREN,"<":u.LESS,">":u.GREAT};function Qs(t){return/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t)}var qe=class{input;pos=0;line=1;column=1;tokens=[];pendingHeredocs=[];constructor(e){this.input=e}tokenize(){let s=this.input.length,r=this.tokens,n=this.pendingHeredocs;for(;this.pos<s&&(this.skipWhitespace(),!(this.pos>=s));){if(n.length>0&&r.length>0&&r[r.length-1].type===u.NEWLINE){this.readHeredocContent();continue}let o=this.nextToken();o&&r.push(o)}return r.push({type:u.EOF,value:"",start:this.pos,end:this.pos,line:this.line,column:this.column}),r}skipWhitespace(){let e=this.input,s=e.length,r=this.pos,n=this.column,o=this.line;for(;r<s;){let i=e[r];if(i===" "||i===" ")r++,n++;else if(i==="\\"&&e[r+1]===`
3
3
  `)r+=2,o++,n=1;else break}this.pos=r,this.column=n,this.line=o}nextToken(){let e=this.input,s=this.pos,r=this.line,n=this.column,o=e[s],i=e[s+1],a=e[s+2];if(o==="#")return this.readComment(s,r,n);if(o===`
4
4
  `)return this.pos=s+1,this.line++,this.column=1,{type:u.NEWLINE,value:`
@@ -0,0 +1,10 @@
1
+ /**
2
+ * comm - compare two sorted files line by line
3
+ *
4
+ * Outputs three columns:
5
+ * - Column 1: lines only in FILE1
6
+ * - Column 2: lines only in FILE2
7
+ * - Column 3: lines in both files
8
+ */
9
+ import type { Command } from "../../types.js";
10
+ export declare const commCommand: Command;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * file - determine file type
3
+ *
4
+ * Uses the file-type npm package for magic byte detection.
5
+ */
6
+ import type { Command } from "../../types.js";
7
+ export declare const fileCommand: Command;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared checksum utilities for md5sum, sha1sum, sha256sum
3
+ * Uses WebCrypto API for SHA algorithms, pure JS for MD5
4
+ */
5
+ import type { Command } from "../../types.js";
6
+ export type HashAlgorithm = "md5" | "sha1" | "sha256";
7
+ export declare function createChecksumCommand(name: string, algorithm: HashAlgorithm, summary: string): Command;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "../../types.js";
2
+ export declare const md5sumCommand: Command;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "../../types.js";
2
+ export declare const sha1sumCommand: Command;
@@ -0,0 +1,2 @@
1
+ import type { Command } from "../../types.js";
2
+ export declare const sha256sumCommand: Command;
@@ -19,6 +19,7 @@ export declare function applyWidth(value: string, width: number, precision: numb
19
19
  export declare function parseWidthPrecision(format: string, startIndex: number): [number, number, number];
20
20
  /**
21
21
  * Process escape sequences in a string
22
- * Handles: \n, \t, \r, \\, \a, \b, \f, \v, \0NNN (octal), \xHH (hex)
22
+ * Handles: \n, \t, \r, \\, \a, \b, \f, \v, \e, \0NNN (octal), \xHH (hex),
23
+ * \uHHHH (unicode), \UHHHHHHHH (unicode)
23
24
  */
24
25
  export declare function processEscapes(str: string): string;
@@ -1,6 +1,6 @@
1
1
  import type { Command } from "../types.js";
2
2
  /** All available built-in command names (excludes network commands like curl) */
3
- export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "html-to-markdown" | "help" | "which";
3
+ export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which";
4
4
  /** Network command names (only available when network is configured) */
5
5
  export type NetworkCommandName = "curl";
6
6
  /** All command names including network commands */
@@ -7,12 +7,24 @@ export interface KeySpec {
7
7
  reverse?: boolean;
8
8
  ignoreCase?: boolean;
9
9
  ignoreLeading?: boolean;
10
+ humanNumeric?: boolean;
11
+ versionSort?: boolean;
12
+ dictionaryOrder?: boolean;
13
+ monthSort?: boolean;
10
14
  }
11
15
  export interface SortOptions {
12
16
  reverse: boolean;
13
17
  numeric: boolean;
14
18
  unique: boolean;
15
19
  ignoreCase: boolean;
20
+ humanNumeric: boolean;
21
+ versionSort: boolean;
22
+ dictionaryOrder: boolean;
23
+ monthSort: boolean;
24
+ ignoreLeadingBlanks: boolean;
25
+ stable: boolean;
26
+ checkOnly: boolean;
27
+ outputFile: string | null;
16
28
  keys: KeySpec[];
17
29
  fieldDelimiter: string | null;
18
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,6 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "diff": "^8.0.2",
78
+ "file-type": "^21.2.0",
78
79
  "minimatch": "^10.1.1",
79
80
  "sprintf-js": "^1.1.3",
80
81
  "turndown": "^7.2.2"