typescript-virtual-container 1.2.9 → 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 (281) hide show
  1. package/.vscode/settings.json +0 -1
  2. package/README.md +141 -50
  3. package/biome.json +7 -0
  4. package/dist/SSHMimic/exec.d.ts.map +1 -1
  5. package/dist/SSHMimic/executor.d.ts.map +1 -1
  6. package/dist/SSHMimic/executor.js +32 -16
  7. package/dist/SSHMimic/index.d.ts.map +1 -1
  8. package/dist/SSHMimic/index.js +20 -6
  9. package/dist/VirtualFileSystem/binaryPack.d.ts.map +1 -1
  10. package/dist/VirtualFileSystem/binaryPack.js +29 -6
  11. package/dist/VirtualFileSystem/index.d.ts.map +1 -1
  12. package/dist/VirtualFileSystem/index.js +36 -13
  13. package/dist/VirtualPackageManager/index.d.ts.map +1 -1
  14. package/dist/VirtualPackageManager/index.js +192 -43
  15. package/dist/VirtualShell/index.d.ts +10 -4
  16. package/dist/VirtualShell/index.d.ts.map +1 -1
  17. package/dist/VirtualShell/index.js +18 -7
  18. package/dist/VirtualShell/shell.d.ts.map +1 -1
  19. package/dist/VirtualShell/shell.js +3 -1
  20. package/dist/VirtualShell/shellParser.d.ts.map +1 -1
  21. package/dist/VirtualUserManager/index.d.ts.map +1 -1
  22. package/dist/commands/adduser.d.ts +6 -0
  23. package/dist/commands/adduser.d.ts.map +1 -1
  24. package/dist/commands/adduser.js +6 -0
  25. package/dist/commands/alias.d.ts +5 -0
  26. package/dist/commands/alias.d.ts.map +1 -1
  27. package/dist/commands/alias.js +5 -0
  28. package/dist/commands/apt.d.ts +5 -0
  29. package/dist/commands/apt.d.ts.map +1 -1
  30. package/dist/commands/apt.js +32 -9
  31. package/dist/commands/awk.d.ts +11 -0
  32. package/dist/commands/awk.d.ts.map +1 -1
  33. package/dist/commands/awk.js +15 -2
  34. package/dist/commands/base64.d.ts +5 -0
  35. package/dist/commands/base64.d.ts.map +1 -1
  36. package/dist/commands/base64.js +9 -1
  37. package/dist/commands/cat.d.ts +5 -0
  38. package/dist/commands/cat.d.ts.map +1 -1
  39. package/dist/commands/cat.js +10 -2
  40. package/dist/commands/cd.d.ts +5 -0
  41. package/dist/commands/cd.d.ts.map +1 -1
  42. package/dist/commands/cd.js +5 -0
  43. package/dist/commands/chmod.d.ts +5 -0
  44. package/dist/commands/chmod.d.ts.map +1 -1
  45. package/dist/commands/chmod.js +5 -0
  46. package/dist/commands/cp.d.ts +5 -0
  47. package/dist/commands/cp.d.ts.map +1 -1
  48. package/dist/commands/cp.js +5 -0
  49. package/dist/commands/curl.d.ts +5 -0
  50. package/dist/commands/curl.d.ts.map +1 -1
  51. package/dist/commands/curl.js +34 -6
  52. package/dist/commands/cut.d.ts +5 -0
  53. package/dist/commands/cut.d.ts.map +1 -1
  54. package/dist/commands/cut.js +8 -1
  55. package/dist/commands/date.d.ts +5 -0
  56. package/dist/commands/date.d.ts.map +1 -1
  57. package/dist/commands/date.js +7 -1
  58. package/dist/commands/declare.d.ts +3 -0
  59. package/dist/commands/declare.d.ts.map +1 -0
  60. package/dist/commands/declare.js +39 -0
  61. package/dist/commands/diff.d.ts +5 -0
  62. package/dist/commands/diff.d.ts.map +1 -1
  63. package/dist/commands/diff.js +5 -0
  64. package/dist/commands/dpkg.d.ts +5 -0
  65. package/dist/commands/dpkg.d.ts.map +1 -1
  66. package/dist/commands/dpkg.js +24 -7
  67. package/dist/commands/du.d.ts.map +1 -1
  68. package/dist/commands/du.js +8 -2
  69. package/dist/commands/echo.d.ts +5 -0
  70. package/dist/commands/echo.d.ts.map +1 -1
  71. package/dist/commands/echo.js +13 -4
  72. package/dist/commands/env.d.ts +5 -0
  73. package/dist/commands/env.d.ts.map +1 -1
  74. package/dist/commands/env.js +11 -1
  75. package/dist/commands/exit.d.ts +5 -0
  76. package/dist/commands/exit.d.ts.map +1 -1
  77. package/dist/commands/exit.js +12 -2
  78. package/dist/commands/export.d.ts.map +1 -1
  79. package/dist/commands/export.js +3 -1
  80. package/dist/commands/find.d.ts +5 -0
  81. package/dist/commands/find.d.ts.map +1 -1
  82. package/dist/commands/find.js +5 -0
  83. package/dist/commands/free.d.ts +5 -0
  84. package/dist/commands/free.d.ts.map +1 -1
  85. package/dist/commands/free.js +5 -0
  86. package/dist/commands/grep.d.ts +5 -0
  87. package/dist/commands/grep.d.ts.map +1 -1
  88. package/dist/commands/grep.js +12 -2
  89. package/dist/commands/gzip.d.ts +5 -0
  90. package/dist/commands/gzip.d.ts.map +1 -1
  91. package/dist/commands/gzip.js +18 -2
  92. package/dist/commands/head.d.ts +5 -0
  93. package/dist/commands/head.d.ts.map +1 -1
  94. package/dist/commands/head.js +5 -0
  95. package/dist/commands/help.d.ts.map +1 -1
  96. package/dist/commands/help.js +98 -45
  97. package/dist/commands/history.d.ts +5 -0
  98. package/dist/commands/history.d.ts.map +1 -1
  99. package/dist/commands/history.js +5 -0
  100. package/dist/commands/hostname.d.ts +5 -0
  101. package/dist/commands/hostname.d.ts.map +1 -1
  102. package/dist/commands/hostname.js +5 -0
  103. package/dist/commands/id.d.ts.map +1 -1
  104. package/dist/commands/id.js +4 -1
  105. package/dist/commands/index.d.ts +2 -17
  106. package/dist/commands/index.d.ts.map +1 -1
  107. package/dist/commands/index.js +2 -340
  108. package/dist/commands/ls.d.ts.map +1 -1
  109. package/dist/commands/ls.js +3 -1
  110. package/dist/commands/lsb-release.d.ts.map +1 -1
  111. package/dist/commands/lsb-release.js +8 -2
  112. package/dist/commands/nano.js +1 -1
  113. package/dist/commands/neofetch.js +1 -1
  114. package/dist/commands/node.d.ts +9 -0
  115. package/dist/commands/node.d.ts.map +1 -0
  116. package/dist/commands/node.js +316 -0
  117. package/dist/commands/npm.d.ts +19 -0
  118. package/dist/commands/npm.d.ts.map +1 -0
  119. package/dist/commands/npm.js +109 -0
  120. package/dist/commands/ping.d.ts.map +1 -1
  121. package/dist/commands/ping.js +3 -1
  122. package/dist/commands/printf.d.ts +3 -0
  123. package/dist/commands/printf.d.ts.map +1 -0
  124. package/dist/commands/printf.js +113 -0
  125. package/dist/commands/ps.d.ts.map +1 -1
  126. package/dist/commands/ps.js +4 -1
  127. package/dist/commands/python.d.ts +30 -0
  128. package/dist/commands/python.d.ts.map +1 -0
  129. package/dist/commands/python.js +2058 -0
  130. package/dist/commands/read.d.ts +3 -0
  131. package/dist/commands/read.d.ts.map +1 -0
  132. package/dist/commands/read.js +34 -0
  133. package/dist/commands/registry.d.ts +8 -0
  134. package/dist/commands/registry.d.ts.map +1 -0
  135. package/dist/commands/registry.js +229 -0
  136. package/dist/commands/runtime.d.ts +6 -0
  137. package/dist/commands/runtime.d.ts.map +1 -0
  138. package/dist/commands/runtime.js +280 -0
  139. package/dist/commands/sed.d.ts.map +1 -1
  140. package/dist/commands/sed.js +11 -3
  141. package/dist/commands/set.d.ts.map +1 -1
  142. package/dist/commands/set.js +9 -3
  143. package/dist/commands/sh.d.ts.map +1 -1
  144. package/dist/commands/sh.js +57 -36
  145. package/dist/commands/shift.d.ts +5 -0
  146. package/dist/commands/shift.d.ts.map +1 -0
  147. package/dist/commands/shift.js +52 -0
  148. package/dist/commands/sleep.d.ts.map +1 -1
  149. package/dist/commands/sort.d.ts.map +1 -1
  150. package/dist/commands/sort.js +4 -2
  151. package/dist/commands/source.d.ts.map +1 -1
  152. package/dist/commands/source.js +5 -2
  153. package/dist/commands/sudo.js +1 -1
  154. package/dist/commands/tar.d.ts.map +1 -1
  155. package/dist/commands/tar.js +11 -3
  156. package/dist/commands/tee.d.ts.map +1 -1
  157. package/dist/commands/tee.js +8 -6
  158. package/dist/commands/test.d.ts.map +1 -1
  159. package/dist/commands/test.js +46 -24
  160. package/dist/commands/tr.d.ts.map +1 -1
  161. package/dist/commands/tr.js +3 -1
  162. package/dist/commands/true.d.ts +4 -0
  163. package/dist/commands/true.d.ts.map +1 -0
  164. package/dist/commands/true.js +14 -0
  165. package/dist/commands/type.d.ts.map +1 -1
  166. package/dist/commands/type.js +1 -1
  167. package/dist/commands/uname.d.ts.map +1 -1
  168. package/dist/commands/uname.js +4 -1
  169. package/dist/commands/uniq.d.ts.map +1 -1
  170. package/dist/commands/uptime.d.ts.map +1 -1
  171. package/dist/commands/uptime.js +4 -1
  172. package/dist/commands/wget.d.ts.map +1 -1
  173. package/dist/commands/wget.js +32 -7
  174. package/dist/commands/which.d.ts.map +1 -1
  175. package/dist/commands/xargs.d.ts.map +1 -1
  176. package/dist/commands/xargs.js +1 -1
  177. package/dist/index.d.ts +15 -14
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +9 -9
  180. package/dist/modules/linuxRootfs.d.ts +18 -1
  181. package/dist/modules/linuxRootfs.d.ts.map +1 -1
  182. package/dist/modules/linuxRootfs.js +160 -17
  183. package/dist/standalone-wo-sftp.d.ts +2 -0
  184. package/dist/standalone-wo-sftp.d.ts.map +1 -0
  185. package/dist/standalone-wo-sftp.js +30 -0
  186. package/dist/utils/expand.d.ts +50 -0
  187. package/dist/utils/expand.d.ts.map +1 -0
  188. package/dist/utils/expand.js +183 -0
  189. package/dist/utils/vfsDiff.d.ts +90 -0
  190. package/dist/utils/vfsDiff.d.ts.map +1 -0
  191. package/dist/utils/vfsDiff.js +177 -0
  192. package/package.json +2 -1
  193. package/src/SSHMimic/exec.ts +10 -1
  194. package/src/SSHMimic/executor.ts +104 -18
  195. package/src/SSHMimic/index.ts +49 -15
  196. package/src/VirtualFileSystem/binaryPack.ts +35 -8
  197. package/src/VirtualFileSystem/index.ts +78 -28
  198. package/src/VirtualPackageManager/index.ts +208 -49
  199. package/src/VirtualShell/index.ts +35 -7
  200. package/src/VirtualShell/shell.ts +23 -3
  201. package/src/VirtualShell/shellParser.ts +134 -36
  202. package/src/VirtualUserManager/index.ts +7 -2
  203. package/src/commands/adduser.ts +6 -0
  204. package/src/commands/alias.ts +5 -1
  205. package/src/commands/apt.ts +47 -17
  206. package/src/commands/awk.ts +20 -6
  207. package/src/commands/base64.ts +13 -2
  208. package/src/commands/cat.ts +13 -5
  209. package/src/commands/cd.ts +5 -0
  210. package/src/commands/chmod.ts +5 -0
  211. package/src/commands/cp.ts +5 -0
  212. package/src/commands/curl.ts +56 -12
  213. package/src/commands/cut.ts +8 -1
  214. package/src/commands/date.ts +7 -1
  215. package/src/commands/declare.ts +44 -0
  216. package/src/commands/diff.ts +17 -3
  217. package/src/commands/dpkg.ts +33 -11
  218. package/src/commands/du.ts +17 -5
  219. package/src/commands/echo.ts +22 -9
  220. package/src/commands/env.ts +11 -1
  221. package/src/commands/exit.ts +12 -2
  222. package/src/commands/export.ts +3 -1
  223. package/src/commands/find.ts +5 -0
  224. package/src/commands/free.ts +9 -2
  225. package/src/commands/grep.ts +12 -2
  226. package/src/commands/gzip.ts +28 -4
  227. package/src/commands/head.ts +5 -0
  228. package/src/commands/help.ts +121 -47
  229. package/src/commands/history.ts +7 -2
  230. package/src/commands/hostname.ts +5 -0
  231. package/src/commands/id.ts +4 -1
  232. package/src/commands/index.ts +9 -360
  233. package/src/commands/ls.ts +5 -3
  234. package/src/commands/lsb-release.ts +8 -2
  235. package/src/commands/nano.ts +1 -1
  236. package/src/commands/neofetch.ts +1 -1
  237. package/src/commands/node.ts +341 -0
  238. package/src/commands/npm.ts +132 -0
  239. package/src/commands/ping.ts +6 -2
  240. package/src/commands/printf.ts +112 -0
  241. package/src/commands/ps.ts +21 -9
  242. package/src/commands/python.ts +2229 -0
  243. package/src/commands/read.ts +41 -0
  244. package/src/commands/registry.ts +244 -0
  245. package/src/commands/runtime.ts +353 -0
  246. package/src/commands/sed.ts +27 -9
  247. package/src/commands/set.ts +9 -3
  248. package/src/commands/sh.ts +159 -55
  249. package/src/commands/shift.ts +53 -0
  250. package/src/commands/sleep.ts +2 -1
  251. package/src/commands/sort.ts +10 -6
  252. package/src/commands/source.ts +15 -3
  253. package/src/commands/sudo.ts +1 -1
  254. package/src/commands/tar.ts +28 -7
  255. package/src/commands/tee.ts +7 -1
  256. package/src/commands/test.ts +61 -26
  257. package/src/commands/tr.ts +3 -1
  258. package/src/commands/true.ts +17 -0
  259. package/src/commands/type.ts +6 -3
  260. package/src/commands/uname.ts +5 -1
  261. package/src/commands/uniq.ts +8 -2
  262. package/src/commands/uptime.ts +4 -1
  263. package/src/commands/wget.ts +51 -12
  264. package/src/commands/which.ts +5 -2
  265. package/src/commands/xargs.ts +11 -2
  266. package/src/index.ts +23 -24
  267. package/src/modules/linuxRootfs.ts +233 -30
  268. package/src/standalone-wo-sftp.ts +38 -0
  269. package/src/utils/expand.ts +238 -0
  270. package/src/utils/vfsDiff.ts +275 -0
  271. package/standalone-wo-sftp.js +507 -0
  272. package/standalone-wo-sftp.js.map +7 -0
  273. package/standalone.js +253 -191
  274. package/standalone.js.map +4 -4
  275. package/tests/bun-test-shim.ts +9 -1
  276. package/tests/command-helpers.test.ts +1 -5
  277. package/tests/new-features.test.ts +415 -5
  278. package/tests/parser-executor.test.ts +27 -27
  279. package/tests/sftp.test.ts +122 -42
  280. package/tests/users.test.ts +23 -5
  281. package/CHANGELOG.md +0 -150
@@ -1,4 +1,9 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * dpkg compatibility command (query/remove/list) backed by the virtual package manager.
4
+ * @category package
5
+ * @params ["[-l] [-s pkg] [-L pkg] [-i pkg] [--remove pkg]"]
6
+ */
2
7
  export declare const dpkgCommand: ShellModule;
3
8
  export declare const dpkgQueryCommand: ShellModule;
4
9
  //# sourceMappingURL=dpkg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dpkg.d.ts","sourceRoot":"","sources":["../../src/commands/dpkg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,WA2GzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WA4C9B,CAAC"}
1
+ {"version":3,"file":"dpkg.d.ts","sourceRoot":"","sources":["../../src/commands/dpkg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA0HzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WA8C9B,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import { ifFlag, parseArgs } from "./command-helpers";
2
2
  import { getPackageManager } from "./helpers";
3
+ /**
4
+ * dpkg compatibility command (query/remove/list) backed by the virtual package manager.
5
+ * @category package
6
+ * @params ["[-l] [-s pkg] [-L pkg] [-i pkg] [--remove pkg]"]
7
+ */
3
8
  export const dpkgCommand = {
4
9
  name: "dpkg",
5
10
  description: "Debian package manager low-level tool",
6
- category: "system",
11
+ category: "package",
7
12
  params: ["[-l] [-s pkg] [-L pkg] [-i pkg] [--remove pkg]"],
8
13
  run: ({ args, authUser, shell }) => {
9
14
  const pm = getPackageManager(shell);
@@ -15,7 +20,18 @@ export const dpkgCommand = {
15
20
  const removeFlag = ifFlag(args, ["-r", "--remove"]);
16
21
  const purgeFlag = ifFlag(args, ["-P", "--purge"]);
17
22
  const { positionals } = parseArgs(args, {
18
- flags: ["-l", "--list", "-s", "--status", "-L", "--listfiles", "-r", "--remove", "-P", "--purge"],
23
+ flags: [
24
+ "-l",
25
+ "--list",
26
+ "-s",
27
+ "--status",
28
+ "-L",
29
+ "--listfiles",
30
+ "-r",
31
+ "--remove",
32
+ "-P",
33
+ "--purge",
34
+ ],
19
35
  });
20
36
  if (listFlag) {
21
37
  const pkgList = pm.listInstalled();
@@ -104,12 +120,15 @@ export const dpkgCommand = {
104
120
  export const dpkgQueryCommand = {
105
121
  name: "dpkg-query",
106
122
  description: "Show information about installed packages",
107
- category: "system",
123
+ category: "package",
108
124
  params: ["-W [pkg] | -l [pattern]"],
109
125
  run: ({ args, shell }) => {
110
126
  const pm = getPackageManager(shell);
111
127
  if (!pm)
112
- return { stderr: "dpkg-query: package manager not initialised", exitCode: 1 };
128
+ return {
129
+ stderr: "dpkg-query: package manager not initialised",
130
+ exitCode: 1,
131
+ };
113
132
  const listFlag = ifFlag(args, ["-l"]);
114
133
  const showFlag = ifFlag(args, ["-W", "--show"]);
115
134
  const { positionals } = parseArgs(args, {
@@ -123,9 +142,7 @@ export const dpkgQueryCommand = {
123
142
  : pkgList;
124
143
  if (showFlag) {
125
144
  return {
126
- stdout: filtered
127
- .map((p) => `${p.name}\t${p.version}`)
128
- .join("\n"),
145
+ stdout: filtered.map((p) => `${p.name}\t${p.version}`).join("\n"),
129
146
  exitCode: 0,
130
147
  };
131
148
  }
@@ -1 +1 @@
1
- {"version":3,"file":"du.d.ts","sourceRoot":"","sources":["../../src/commands/du.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,SAAS,EAAE,WAkCvB,CAAC"}
1
+ {"version":3,"file":"du.d.ts","sourceRoot":"","sources":["../../src/commands/du.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,SAAS,EAAE,WA8CvB,CAAC"}
@@ -12,9 +12,15 @@ export const duCommand = {
12
12
  const p = resolvePath(cwd, target);
13
13
  const fmt = (b) => human ? `${(b / 1024).toFixed(1)}K` : String(Math.ceil(b / 1024));
14
14
  if (!shell.vfs.exists(p))
15
- return { stderr: `du: ${target}: No such file or directory`, exitCode: 1 };
15
+ return {
16
+ stderr: `du: ${target}: No such file or directory`,
17
+ exitCode: 1,
18
+ };
16
19
  if (summary || shell.vfs.stat(p).type === "file") {
17
- return { stdout: `${fmt(shell.vfs.getUsageBytes(p))}\t${target}`, exitCode: 0 };
20
+ return {
21
+ stdout: `${fmt(shell.vfs.getUsageBytes(p))}\t${target}`,
22
+ exitCode: 0,
23
+ };
18
24
  }
19
25
  const lines = [];
20
26
  const walk = (dir, rel) => {
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Echo text to stdout with shell-style expansion and escape support.
4
+ * @category shell
5
+ * @params ["[-n] [-e] [text...]"]
6
+ */
2
7
  export declare const echoCommand: ShellModule;
3
8
  //# sourceMappingURL=echo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../src/commands/echo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBrD,eAAO,MAAM,WAAW,EAAE,WAwBzB,CAAC"}
1
+ {"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../src/commands/echo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAuBrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA6BzB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { parseArgs } from "./command-helpers";
2
+ import { expandSync } from "../utils/expand";
2
3
  /**
3
4
  * Expand escape sequences for `echo -e`.
4
5
  * Handles \n \t \r \\ \a \b \f \v and \0NNN (octal).
@@ -15,19 +16,27 @@ function expandEscapes(text) {
15
16
  .replace(/\\v/g, "\x0B")
16
17
  .replace(/\\0(\d{1,3})/g, (_, oct) => String.fromCharCode(parseInt(oct, 8)));
17
18
  }
19
+ /**
20
+ * Echo text to stdout with shell-style expansion and escape support.
21
+ * @category shell
22
+ * @params ["[-n] [-e] [text...]"]
23
+ */
18
24
  export const echoCommand = {
19
25
  name: "echo",
20
26
  description: "Display text",
21
27
  category: "shell",
22
28
  params: ["[-n] [-e] [text...]"],
23
29
  run: ({ args, stdin, env }) => {
24
- const { flags, positionals } = parseArgs(args, { flags: ["-n", "-e", "-E"] });
30
+ const { flags, positionals } = parseArgs(args, {
31
+ flags: ["-n", "-e", "-E"],
32
+ });
25
33
  const noNewline = flags.has("-n");
26
34
  const escapes = flags.has("-e");
27
35
  const rawText = positionals.length > 0 ? positionals.join(" ") : (stdin ?? "");
28
- // Expand $VAR references using the session env (not the legacy global store)
29
- const varsExpanded = rawText.replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g, (_, name) => env?.vars[name] ?? "");
30
- const text = escapes ? expandEscapes(varsExpanded) : varsExpanded;
36
+ // Full expansion: $? ${#VAR} $((expr)) ~ ${VAR:-def} $VAR etc.
37
+ // $(cmd) is already resolved upstream by runCommand before echo.run is called.
38
+ const expanded = expandSync(rawText, env?.vars ?? {}, env?.lastExitCode ?? 0);
39
+ const text = escapes ? expandEscapes(expanded) : expanded;
31
40
  return {
32
41
  stdout: noNewline ? text : `${text}\n`,
33
42
  exitCode: 0,
@@ -1,4 +1,9 @@
1
1
  /** biome-ignore-all lint/style/useNamingConvention: ENV VARS */
2
2
  import type { ShellModule } from "../types/commands";
3
+ /**
4
+ * Print environment variables for the current session.
5
+ * @category shell
6
+ * @params []
7
+ */
3
8
  export declare const envCommand: ShellModule;
4
9
  //# sourceMappingURL=env.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,WASxB,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WAcxB,CAAC"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Print environment variables for the current session.
3
+ * @category shell
4
+ * @params []
5
+ */
1
6
  export const envCommand = {
2
7
  name: "env",
3
8
  description: "Print environment variables",
@@ -5,6 +10,11 @@ export const envCommand = {
5
10
  params: [],
6
11
  run: ({ env, authUser }) => {
7
12
  const vars = { ...env.vars, USER: authUser, HOME: `/home/${authUser}` };
8
- return { stdout: Object.entries(vars).map(([k, v]) => `${k}=${v}`).join("\n"), exitCode: 0 };
13
+ return {
14
+ stdout: Object.entries(vars)
15
+ .map(([k, v]) => `${k}=${v}`)
16
+ .join("\n"),
17
+ exitCode: 0,
18
+ };
9
19
  },
10
20
  };
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Exit the current shell session (closeSession flag).
4
+ * @category shell
5
+ * @params ["[code]"]
6
+ */
2
7
  export declare const exitCommand: ShellModule;
3
8
  //# sourceMappingURL=exit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["../../src/commands/exit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC"}
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["../../src/commands/exit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAUzB,CAAC"}
@@ -1,6 +1,16 @@
1
+ /**
2
+ * Exit the current shell session (closeSession flag).
3
+ * @category shell
4
+ * @params ["[code]"]
5
+ */
1
6
  export const exitCommand = {
2
7
  name: "exit",
3
8
  aliases: ["bye"],
4
- params: [],
5
- run: () => ({ closeSession: true, exitCode: 0 }),
9
+ description: "Exit the shell session",
10
+ category: "shell",
11
+ params: ["[code]"],
12
+ run: ({ args }) => ({
13
+ closeSession: true,
14
+ exitCode: parseInt(args[0] ?? "0", 10) || 0,
15
+ }),
6
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,WAsB3B,CAAC"}
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,WAwB3B,CAAC"}
@@ -5,7 +5,9 @@ export const exportCommand = {
5
5
  params: ["[VAR=value]"],
6
6
  run: ({ args, env }) => {
7
7
  if (args.length === 0) {
8
- const out = Object.entries(env.vars).map(([k, v]) => `declare -x ${k}="${v}"`).join("\n");
8
+ const out = Object.entries(env.vars)
9
+ .map(([k, v]) => `declare -x ${k}="${v}"`)
10
+ .join("\n");
9
11
  return { stdout: out, exitCode: 0 };
10
12
  }
11
13
  for (const arg of args) {
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Find files and directories by name and type with minimal pattern support.
4
+ * @category files
5
+ * @params ["[path] [-name <pattern>] [-type f|d]"]
6
+ */
2
7
  export declare const findCommand: ShellModule;
3
8
  //# sourceMappingURL=find.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/commands/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,WA0DzB,CAAC"}
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/commands/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA0DzB,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import { getFlag } from "./command-helpers";
2
2
  import { assertPathAccess, resolvePath } from "./helpers";
3
+ /**
4
+ * Find files and directories by name and type with minimal pattern support.
5
+ * @category files
6
+ * @params ["[path] [-name <pattern>] [-type f|d]"]
7
+ */
3
8
  export const findCommand = {
4
9
  name: "find",
5
10
  description: "Search for files",
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Display memory usage information (human / MB / GB options).
4
+ * @category system
5
+ * @params ["[-h] [-m] [-g]"]
6
+ */
2
7
  export declare const freeCommand: ShellModule;
3
8
  //# sourceMappingURL=free.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"free.d.ts","sourceRoot":"","sources":["../../src/commands/free.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,WAAW,EAAE,WAmCzB,CAAC"}
1
+ {"version":3,"file":"free.d.ts","sourceRoot":"","sources":["../../src/commands/free.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAqCzB,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import * as os from "node:os";
2
2
  import { ifFlag } from "./command-helpers";
3
+ /**
4
+ * Display memory usage information (human / MB / GB options).
5
+ * @category system
6
+ * @params ["[-h] [-m] [-g]"]
7
+ */
3
8
  export const freeCommand = {
4
9
  name: "free",
5
10
  description: "Display amount of free and used memory",
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Search for a regex pattern in files or stdin with common flags.
4
+ * @category text
5
+ * @params ["[-i] [-v] [-n] [-r] <pattern> [file...]"]
6
+ */
2
7
  export declare const grepCommand: ShellModule;
3
8
  //# sourceMappingURL=grep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grep.d.ts","sourceRoot":"","sources":["../../src/commands/grep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,WAwFzB,CAAC"}
1
+ {"version":3,"file":"grep.d.ts","sourceRoot":"","sources":["../../src/commands/grep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA6FzB,CAAC"}
@@ -1,12 +1,19 @@
1
1
  import { parseArgs } from "./command-helpers";
2
2
  import { assertPathAccess, resolvePath } from "./helpers";
3
+ /**
4
+ * Search for a regex pattern in files or stdin with common flags.
5
+ * @category text
6
+ * @params ["[-i] [-v] [-n] [-r] <pattern> [file...]"]
7
+ */
3
8
  export const grepCommand = {
4
9
  name: "grep",
5
10
  description: "Search text patterns",
6
11
  category: "text",
7
12
  params: ["[-i] [-v] [-n] [-r] <pattern> [file...]"],
8
13
  run: ({ authUser, shell, cwd, args, stdin }) => {
9
- const { flags, positionals } = parseArgs(args, { flags: ["-i", "-v", "-n", "-r"] });
14
+ const { flags, positionals } = parseArgs(args, {
15
+ flags: ["-i", "-v", "-n", "-r"],
16
+ });
10
17
  const caseInsensitive = flags.has("-i");
11
18
  const invertMatch = flags.has("-v");
12
19
  const showLineNumbers = flags.has("-n");
@@ -80,7 +87,10 @@ export const grepCommand = {
80
87
  results.push(...matchLines(content, prefix));
81
88
  }
82
89
  catch {
83
- return { stderr: `grep: ${file}: No such file or directory`, exitCode: 1 };
90
+ return {
91
+ stderr: `grep: ${file}: No such file or directory`,
92
+ exitCode: 1,
93
+ };
84
94
  }
85
95
  }
86
96
  }
@@ -1,4 +1,9 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Compress files using gzip (stores in VFS as compressed content).
4
+ * @category archive
5
+ * @params ["<file>"]
6
+ */
2
7
  export declare const gzipCommand: ShellModule;
3
8
  export declare const gunzipCommand: ShellModule;
4
9
  //# sourceMappingURL=gzip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gzip.d.ts","sourceRoot":"","sources":["../../src/commands/gzip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,WAAW,EAAE,WAYzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAa3B,CAAC"}
1
+ {"version":3,"file":"gzip.d.ts","sourceRoot":"","sources":["../../src/commands/gzip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAmBzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,WAyB3B,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { resolvePath } from "./helpers";
2
+ /**
3
+ * Compress files using gzip (stores in VFS as compressed content).
4
+ * @category archive
5
+ * @params ["<file>"]
6
+ */
2
7
  export const gzipCommand = {
3
8
  name: "gzip",
4
9
  description: "Compress files",
@@ -14,11 +19,19 @@ export const gzipCommand = {
14
19
  return { exitCode: 0 };
15
20
  }
16
21
  catch {
17
- return { stderr: `gzip: ${file}: No such file or directory`, exitCode: 1 };
22
+ return {
23
+ stderr: `gzip: ${file}: No such file or directory`,
24
+ exitCode: 1,
25
+ };
18
26
  }
19
27
  },
20
28
  };
21
29
  export const gunzipCommand = {
30
+ /**
31
+ * Decompress gzip files (or zcat alias).
32
+ * @category archive
33
+ * @params ["<file>"]
34
+ */
22
35
  name: "gunzip",
23
36
  description: "Decompress files",
24
37
  category: "archive",
@@ -34,7 +47,10 @@ export const gunzipCommand = {
34
47
  return { exitCode: 0 };
35
48
  }
36
49
  catch {
37
- return { stderr: `gunzip: ${file}: No such file or directory`, exitCode: 1 };
50
+ return {
51
+ stderr: `gunzip: ${file}: No such file or directory`,
52
+ exitCode: 1,
53
+ };
38
54
  }
39
55
  },
40
56
  };
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Output the first part of files or stdin (head).
4
+ * @category text
5
+ * @params ["[-n <lines>] [file...]"]
6
+ */
2
7
  export declare const headCommand: ShellModule;
3
8
  //# sourceMappingURL=head.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"head.d.ts","sourceRoot":"","sources":["../../src/commands/head.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,WAgCzB,CAAC"}
1
+ {"version":3,"file":"head.d.ts","sourceRoot":"","sources":["../../src/commands/head.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAgCzB,CAAC"}
@@ -1,5 +1,10 @@
1
1
  import { getFlag } from "./command-helpers";
2
2
  import { assertPathAccess, resolvePath } from "./helpers";
3
+ /**
4
+ * Output the first part of files or stdin (head).
5
+ * @category text
6
+ * @params ["[-n <lines>] [file...]"]
7
+ */
3
8
  export const headCommand = {
4
9
  name: "head",
5
10
  description: "Output first lines",
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBrD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,MAAM,EAAE,GAAG,WAAW,CAyDxE"}
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/commands/help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA6HrD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,MAAM,EAAE,GAAG,WAAW,CA0BxE"}
@@ -1,70 +1,123 @@
1
- import { getCommandModulesPublic } from "./index";
2
- const CATEGORY_ORDER = ["navigation", "files", "text", "archive", "system", "network", "shell", "users", "misc"];
1
+ import { getCommandModulesPublic } from "./registry";
2
+ // ─── category config ──────────────────────────────────────────────────────────
3
+ const CATEGORY_ORDER = [
4
+ "navigation",
5
+ "files",
6
+ "text",
7
+ "archive",
8
+ "system",
9
+ "package",
10
+ "network",
11
+ "shell",
12
+ "users",
13
+ "misc",
14
+ ];
3
15
  const CATEGORY_LABELS = {
4
16
  navigation: "Navigation",
5
17
  files: "Files & Filesystem",
6
18
  text: "Text Processing",
7
19
  archive: "Archive & Compression",
8
20
  system: "System",
21
+ package: "Package Management",
9
22
  network: "Network",
10
- shell: "Shell",
23
+ shell: "Shell & Scripting",
11
24
  users: "Users & Permissions",
12
25
  misc: "Miscellaneous",
13
26
  };
14
- function padRight(s, n) {
27
+ // ─── formatting helpers ───────────────────────────────────────────────────────
28
+ const BOLD = "\x1b[1m";
29
+ const RESET = "\x1b[0m";
30
+ const CYAN = "\x1b[36m";
31
+ const YLW = "\x1b[33m";
32
+ const DIM = "\x1b[2m";
33
+ const GREEN = "\x1b[32m";
34
+ function pad(s, n) {
15
35
  return s.length >= n ? s : s + " ".repeat(n - s.length);
16
36
  }
37
+ function formatCmdLine(mod) {
38
+ const aliases = mod.aliases?.length
39
+ ? ` ${DIM}(${mod.aliases.join(", ")})${RESET}`
40
+ : "";
41
+ return ` ${CYAN}${pad(mod.name, 16)}${RESET}${aliases}${pad("", mod.aliases?.length ? 0 : 0)} ${mod.description ?? ""}`;
42
+ }
43
+ // ─── full grouped listing ─────────────────────────────────────────────────────
44
+ function renderFull(modules) {
45
+ const grouped = {};
46
+ for (const mod of modules) {
47
+ const cat = mod.category ?? "misc";
48
+ if (!grouped[cat])
49
+ grouped[cat] = [];
50
+ grouped[cat].push(mod);
51
+ }
52
+ const lines = [
53
+ `${BOLD}Available commands${RESET}`,
54
+ `${DIM}Type 'help <command>' for detailed usage.${RESET}`,
55
+ "",
56
+ ];
57
+ const cats = [
58
+ ...CATEGORY_ORDER.filter((c) => grouped[c]),
59
+ ...Object.keys(grouped)
60
+ .filter((c) => !CATEGORY_ORDER.includes(c))
61
+ .sort(),
62
+ ];
63
+ for (const cat of cats) {
64
+ const mods = grouped[cat];
65
+ if (!mods?.length)
66
+ continue;
67
+ lines.push(`${YLW}${CATEGORY_LABELS[cat] ?? cat}${RESET}`);
68
+ const sorted = [...mods].sort((a, b) => a.name.localeCompare(b.name));
69
+ for (const mod of sorted) {
70
+ lines.push(formatCmdLine(mod));
71
+ }
72
+ lines.push("");
73
+ }
74
+ const total = modules.length;
75
+ lines.push(`${DIM}${total} commands available.${RESET}`);
76
+ return lines.join("\n");
77
+ }
78
+ // ─── single-command detail ────────────────────────────────────────────────────
79
+ function renderDetail(mod) {
80
+ const lines = [];
81
+ lines.push(`${BOLD}${mod.name}${RESET} — ${mod.description ?? "no description"}`);
82
+ if (mod.aliases?.length) {
83
+ lines.push(`${DIM}Aliases: ${mod.aliases.join(", ")}${RESET}`);
84
+ }
85
+ lines.push("");
86
+ lines.push(`${GREEN}Usage:${RESET}`);
87
+ if (mod.params.length) {
88
+ for (const p of mod.params) {
89
+ lines.push(` ${mod.name} ${p}`);
90
+ }
91
+ }
92
+ else {
93
+ lines.push(` ${mod.name}`);
94
+ }
95
+ const catLabel = CATEGORY_LABELS[mod.category ?? "misc"] ?? mod.category ?? "misc";
96
+ lines.push("");
97
+ lines.push(`${DIM}Category: ${catLabel}${RESET}`);
98
+ return lines.join("\n");
99
+ }
100
+ // ─── export ───────────────────────────────────────────────────────────────────
17
101
  export function createHelpCommand(_getNames) {
18
102
  return {
19
103
  name: "help",
20
- description: "Display this help message",
104
+ description: "List all commands, or show usage for a specific command",
21
105
  category: "shell",
22
106
  params: ["[command]"],
23
107
  run: ({ args }) => {
24
108
  const modules = getCommandModulesPublic();
25
- // help <command>
26
109
  if (args[0]) {
27
- const mod = modules.find((m) => m.name === args[0] || m.aliases?.includes(args[0]));
28
- if (!mod)
29
- return { stderr: `help: no help for '${args[0]}'`, exitCode: 1 };
30
- const aliases = mod.aliases?.length ? ` aliases: ${mod.aliases.join(", ")}\n` : "";
31
- const params = mod.params.map((p) => ` ${mod.name} ${p}`).join("\n");
32
- return {
33
- stdout: [
34
- `\x1b[1m${mod.name}\x1b[0m — ${mod.description ?? "no description"}`,
35
- aliases,
36
- "Usage:",
37
- params || ` ${mod.name}`,
38
- ].filter(Boolean).join("\n"),
39
- exitCode: 0,
40
- };
41
- }
42
- // Full help — grouped by category
43
- const grouped = {};
44
- for (const mod of modules) {
45
- const cat = mod.category ?? "misc";
46
- if (!grouped[cat])
47
- grouped[cat] = [];
48
- grouped[cat].push(mod);
49
- }
50
- const lines = [];
51
- lines.push("\x1b[1mAvailable commands\x1b[0m");
52
- lines.push("");
53
- const cats = [
54
- ...CATEGORY_ORDER.filter((c) => grouped[c]),
55
- ...Object.keys(grouped).filter((c) => !CATEGORY_ORDER.includes(c)),
56
- ];
57
- for (const cat of cats) {
58
- const mods = grouped[cat];
59
- if (!mods || mods.length === 0)
60
- continue;
61
- lines.push(`\x1b[33m${CATEGORY_LABELS[cat] ?? cat}\x1b[0m`);
62
- const sorted = [...mods].sort((a, b) => a.name.localeCompare(b.name));
63
- for (const mod of sorted) {
64
- lines.push(` \x1b[36m${padRight(mod.name, 14)}\x1b[0m ${mod.description ?? ""}`);
110
+ const target = args[0].toLowerCase();
111
+ const mod = modules.find((m) => m.name === target || m.aliases?.includes(target));
112
+ if (!mod) {
113
+ return {
114
+ stderr: `help: no help entry for '${args[0]}'`,
115
+ exitCode: 1,
116
+ };
65
117
  }
118
+ return { stdout: renderDetail(mod), exitCode: 0 };
66
119
  }
67
- return { stdout: lines.join("\n"), exitCode: 0 };
120
+ return { stdout: renderFull(modules), exitCode: 0 };
68
121
  },
69
122
  };
70
123
  }
@@ -1,3 +1,8 @@
1
1
  import type { ShellModule } from "../types/commands";
2
+ /**
3
+ * Display persisted command history for the session (from VFS).
4
+ * @category shell
5
+ * @params ["[n]"]
6
+ */
2
7
  export declare const historyCommand: ShellModule;
3
8
  //# sourceMappingURL=history.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/commands/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,WA0B5B,CAAC"}
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/commands/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,WA0B5B,CAAC"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Display persisted command history for the session (from VFS).
3
+ * @category shell
4
+ * @params ["[n]"]
5
+ */
1
6
  export const historyCommand = {
2
7
  name: "history",
3
8
  description: "Display command history",