@fnndsc/brasa 0.56.2 → 0.56.3

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 (322) hide show
  1. package/dist/buildinfo.json +1 -1
  2. package/dist/builtins/berth/berthCube.d.ts +3 -2
  3. package/dist/builtins/berth/berthCube.js +5 -10
  4. package/dist/builtins/berth/berthCube.js.map +1 -1
  5. package/dist/builtins/debug.d.ts +24 -3
  6. package/dist/builtins/debug.js +66 -13
  7. package/dist/builtins/debug.js.map +1 -1
  8. package/dist/builtins/fs/acl.args.d.ts +5 -38
  9. package/dist/builtins/fs/acl.args.js +6 -72
  10. package/dist/builtins/fs/acl.args.js.map +1 -1
  11. package/dist/builtins/fs/acl.d.ts +100 -10
  12. package/dist/builtins/fs/acl.js +222 -68
  13. package/dist/builtins/fs/acl.js.map +1 -1
  14. package/dist/builtins/fs/cat.args.d.ts +14 -15
  15. package/dist/builtins/fs/cat.args.js +13 -40
  16. package/dist/builtins/fs/cat.args.js.map +1 -1
  17. package/dist/builtins/fs/cat.d.ts +40 -3
  18. package/dist/builtins/fs/cat.js +89 -10
  19. package/dist/builtins/fs/cat.js.map +1 -1
  20. package/dist/builtins/fs/cd.d.ts +24 -6
  21. package/dist/builtins/fs/cd.js +71 -18
  22. package/dist/builtins/fs/cd.js.map +1 -1
  23. package/dist/builtins/fs/configWrite.d.ts +24 -8
  24. package/dist/builtins/fs/configWrite.js +77 -36
  25. package/dist/builtins/fs/configWrite.js.map +1 -1
  26. package/dist/builtins/fs/cp.d.ts +39 -4
  27. package/dist/builtins/fs/cp.js +120 -55
  28. package/dist/builtins/fs/cp.js.map +1 -1
  29. package/dist/builtins/fs/du.d.ts +59 -33
  30. package/dist/builtins/fs/du.js +111 -79
  31. package/dist/builtins/fs/du.js.map +1 -1
  32. package/dist/builtins/fs/edit.d.ts +19 -4
  33. package/dist/builtins/fs/edit.js +77 -16
  34. package/dist/builtins/fs/edit.js.map +1 -1
  35. package/dist/builtins/fs/find.d.ts +25 -0
  36. package/dist/builtins/fs/find.js +76 -5
  37. package/dist/builtins/fs/find.js.map +1 -1
  38. package/dist/builtins/fs/mkdir.d.ts +28 -18
  39. package/dist/builtins/fs/mkdir.js +95 -66
  40. package/dist/builtins/fs/mkdir.js.map +1 -1
  41. package/dist/builtins/fs/mv.d.ts +34 -4
  42. package/dist/builtins/fs/mv.js +129 -64
  43. package/dist/builtins/fs/mv.js.map +1 -1
  44. package/dist/builtins/fs/pull.args.d.ts +56 -17
  45. package/dist/builtins/fs/pull.args.js +16 -66
  46. package/dist/builtins/fs/pull.args.js.map +1 -1
  47. package/dist/builtins/fs/pull.d.ts +62 -0
  48. package/dist/builtins/fs/pull.js +86 -22
  49. package/dist/builtins/fs/pull.js.map +1 -1
  50. package/dist/builtins/fs/pwd.d.ts +19 -5
  51. package/dist/builtins/fs/pwd.js +62 -8
  52. package/dist/builtins/fs/pwd.js.map +1 -1
  53. package/dist/builtins/fs/rm.d.ts +58 -21
  54. package/dist/builtins/fs/rm.js +99 -82
  55. package/dist/builtins/fs/rm.js.map +1 -1
  56. package/dist/builtins/fs/rmdir.d.ts +29 -11
  57. package/dist/builtins/fs/rmdir.js +87 -36
  58. package/dist/builtins/fs/rmdir.js.map +1 -1
  59. package/dist/builtins/fs/touch.d.ts +44 -9
  60. package/dist/builtins/fs/touch.js +91 -27
  61. package/dist/builtins/fs/touch.js.map +1 -1
  62. package/dist/builtins/fs/tree.d.ts +36 -9
  63. package/dist/builtins/fs/tree.js +126 -36
  64. package/dist/builtins/fs/tree.js.map +1 -1
  65. package/dist/builtins/fs/upload.d.ts +22 -3
  66. package/dist/builtins/fs/upload.js +82 -14
  67. package/dist/builtins/fs/upload.js.map +1 -1
  68. package/dist/builtins/fs/xattr.args.d.ts +12 -33
  69. package/dist/builtins/fs/xattr.args.js +17 -95
  70. package/dist/builtins/fs/xattr.args.js.map +1 -1
  71. package/dist/builtins/fs/xattr.d.ts +98 -8
  72. package/dist/builtins/fs/xattr.js +163 -24
  73. package/dist/builtins/fs/xattr.js.map +1 -1
  74. package/dist/builtins/games/bytes.d.ts +201 -5
  75. package/dist/builtins/games/bytes.js +255 -54
  76. package/dist/builtins/games/bytes.js.map +1 -1
  77. package/dist/builtins/games/chimes.d.ts +180 -3
  78. package/dist/builtins/games/chimes.js +203 -26
  79. package/dist/builtins/games/chimes.js.map +1 -1
  80. package/dist/builtins/games/chrislab.d.ts +101 -3
  81. package/dist/builtins/games/chrislab.js +117 -17
  82. package/dist/builtins/games/chrislab.js.map +1 -1
  83. package/dist/builtins/games/cowsay.d.ts +93 -2
  84. package/dist/builtins/games/cowsay.js +90 -31
  85. package/dist/builtins/games/cowsay.js.map +1 -1
  86. package/dist/builtins/games/figlet.d.ts +70 -2
  87. package/dist/builtins/games/figlet.js +83 -6
  88. package/dist/builtins/games/figlet.js.map +1 -1
  89. package/dist/builtins/games/lab.d.ts +104 -5
  90. package/dist/builtins/games/lab.js +144 -6
  91. package/dist/builtins/games/lab.js.map +1 -1
  92. package/dist/builtins/games/lolcat.d.ts +61 -1
  93. package/dist/builtins/games/lolcat.js +59 -24
  94. package/dist/builtins/games/lolcat.js.map +1 -1
  95. package/dist/builtins/games/morse.d.ts +36 -1
  96. package/dist/builtins/games/morse.js +50 -2
  97. package/dist/builtins/games/morse.js.map +1 -1
  98. package/dist/builtins/games/numbers.d.ts +241 -5
  99. package/dist/builtins/games/numbers.js +298 -23
  100. package/dist/builtins/games/numbers.js.map +1 -1
  101. package/dist/builtins/games/play.d.ts +96 -6
  102. package/dist/builtins/games/play.js +137 -6
  103. package/dist/builtins/games/play.js.map +1 -1
  104. package/dist/builtins/games/qr.d.ts +40 -1
  105. package/dist/builtins/games/qr.js +51 -2
  106. package/dist/builtins/games/qr.js.map +1 -1
  107. package/dist/builtins/games/show.d.ts +131 -6
  108. package/dist/builtins/games/show.js +208 -20
  109. package/dist/builtins/games/show.js.map +1 -1
  110. package/dist/builtins/games/sky.d.ts +178 -4
  111. package/dist/builtins/games/sky.js +228 -12
  112. package/dist/builtins/games/sky.js.map +1 -1
  113. package/dist/builtins/games/text.d.ts +258 -7
  114. package/dist/builtins/games/text.js +310 -29
  115. package/dist/builtins/games/text.js.map +1 -1
  116. package/dist/builtins/games/trek.d.ts +67 -3
  117. package/dist/builtins/games/trek.js +63 -10
  118. package/dist/builtins/games/trek.js.map +1 -1
  119. package/dist/builtins/games/wtf.d.ts +58 -1
  120. package/dist/builtins/games/wtf.js +67 -6
  121. package/dist/builtins/games/wtf.js.map +1 -1
  122. package/dist/builtins/help.d.ts +38 -2
  123. package/dist/builtins/help.js +76 -769
  124. package/dist/builtins/help.js.map +1 -1
  125. package/dist/builtins/net/connect.d.ts +36 -3
  126. package/dist/builtins/net/connect.js +84 -26
  127. package/dist/builtins/net/connect.js.map +1 -1
  128. package/dist/builtins/net/cubepath.d.ts +49 -5
  129. package/dist/builtins/net/cubepath.js +69 -27
  130. package/dist/builtins/net/cubepath.js.map +1 -1
  131. package/dist/builtins/net/logout.d.ts +13 -4
  132. package/dist/builtins/net/logout.js +49 -3
  133. package/dist/builtins/net/logout.js.map +1 -1
  134. package/dist/builtins/net/netstat.d.ts +29 -4
  135. package/dist/builtins/net/netstat.js +64 -23
  136. package/dist/builtins/net/netstat.js.map +1 -1
  137. package/dist/builtins/net/pacs.d.ts +169 -15
  138. package/dist/builtins/net/pacs.js +92 -33
  139. package/dist/builtins/net/pacs.js.map +1 -1
  140. package/dist/builtins/net/query.args.d.ts +95 -0
  141. package/dist/builtins/net/query.args.js +26 -0
  142. package/dist/builtins/net/query.args.js.map +1 -0
  143. package/dist/builtins/net/query.d.ts +98 -5
  144. package/dist/builtins/net/query.js +89 -83
  145. package/dist/builtins/net/query.js.map +1 -1
  146. package/dist/builtins/net/status.d.ts +5 -3
  147. package/dist/builtins/net/status.js +5 -12
  148. package/dist/builtins/net/status.js.map +1 -1
  149. package/dist/builtins/parametersofplugin.d.ts +82 -3
  150. package/dist/builtins/parametersofplugin.js +79 -23
  151. package/dist/builtins/parametersofplugin.js.map +1 -1
  152. package/dist/builtins/proc.d.ts +210 -3
  153. package/dist/builtins/proc.js +210 -119
  154. package/dist/builtins/proc.js.map +1 -1
  155. package/dist/builtins/res/compute.d.ts +67 -3
  156. package/dist/builtins/res/compute.js +121 -35
  157. package/dist/builtins/res/compute.js.map +1 -1
  158. package/dist/builtins/res/dicom.d.ts +52 -3
  159. package/dist/builtins/res/dicom.js +82 -34
  160. package/dist/builtins/res/dicom.js.map +1 -1
  161. package/dist/builtins/res/expect.d.ts +52 -3
  162. package/dist/builtins/res/expect.js +92 -29
  163. package/dist/builtins/res/expect.js.map +1 -1
  164. package/dist/builtins/res/feed.d.ts +475 -3
  165. package/dist/builtins/res/feed.js +253 -158
  166. package/dist/builtins/res/feed.js.map +1 -1
  167. package/dist/builtins/res/files.d.ts +517 -3
  168. package/dist/builtins/res/files.js +124 -44
  169. package/dist/builtins/res/files.js.map +1 -1
  170. package/dist/builtins/res/gather.d.ts +113 -3
  171. package/dist/builtins/res/gather.js +153 -44
  172. package/dist/builtins/res/gather.js.map +1 -1
  173. package/dist/builtins/res/gather.process.d.ts +27 -19
  174. package/dist/builtins/res/gather.process.js +29 -59
  175. package/dist/builtins/res/gather.process.js.map +1 -1
  176. package/dist/builtins/res/group.d.ts +284 -3
  177. package/dist/builtins/res/group.js +147 -76
  178. package/dist/builtins/res/group.js.map +1 -1
  179. package/dist/builtins/res/image.d.ts +30 -2
  180. package/dist/builtins/res/image.js +62 -10
  181. package/dist/builtins/res/image.js.map +1 -1
  182. package/dist/builtins/res/play.d.ts +71 -9
  183. package/dist/builtins/res/play.js +124 -82
  184. package/dist/builtins/res/play.js.map +1 -1
  185. package/dist/builtins/res/plugininstance.d.ts +307 -2
  186. package/dist/builtins/res/plugininstance.js +122 -50
  187. package/dist/builtins/res/plugininstance.js.map +1 -1
  188. package/dist/builtins/res/pluginmeta.d.ts +244 -2
  189. package/dist/builtins/res/pluginmeta.js +98 -40
  190. package/dist/builtins/res/pluginmeta.js.map +1 -1
  191. package/dist/builtins/res/record.d.ts +37 -3
  192. package/dist/builtins/res/record.js +127 -57
  193. package/dist/builtins/res/record.js.map +1 -1
  194. package/dist/builtins/res/resourceList.d.ts +136 -0
  195. package/dist/builtins/res/resourceList.js +51 -0
  196. package/dist/builtins/res/resourceList.js.map +1 -0
  197. package/dist/builtins/res/tag.d.ts +244 -3
  198. package/dist/builtins/res/tag.js +97 -41
  199. package/dist/builtins/res/tag.js.map +1 -1
  200. package/dist/builtins/res/user.d.ts +122 -3
  201. package/dist/builtins/res/user.js +83 -21
  202. package/dist/builtins/res/user.js.map +1 -1
  203. package/dist/builtins/res/workflow.d.ts +244 -2
  204. package/dist/builtins/res/workflow.js +97 -40
  205. package/dist/builtins/res/workflow.js.map +1 -1
  206. package/dist/builtins/store.d.ts +85 -3
  207. package/dist/builtins/store.js +135 -68
  208. package/dist/builtins/store.js.map +1 -1
  209. package/dist/builtins/sys/apropos.d.ts +80 -5
  210. package/dist/builtins/sys/apropos.js +121 -15
  211. package/dist/builtins/sys/apropos.js.map +1 -1
  212. package/dist/builtins/sys/cal.d.ts +44 -5
  213. package/dist/builtins/sys/cal.js +57 -10
  214. package/dist/builtins/sys/cal.js.map +1 -1
  215. package/dist/builtins/sys/command.d.ts +20 -0
  216. package/dist/builtins/sys/command.js +31 -0
  217. package/dist/builtins/sys/command.js.map +1 -1
  218. package/dist/builtins/sys/context.d.ts +13 -3
  219. package/dist/builtins/sys/context.js +51 -4
  220. package/dist/builtins/sys/context.js.map +1 -1
  221. package/dist/builtins/sys/date.d.ts +56 -5
  222. package/dist/builtins/sys/date.js +63 -9
  223. package/dist/builtins/sys/date.js.map +1 -1
  224. package/dist/builtins/sys/echo.d.ts +63 -2
  225. package/dist/builtins/sys/echo.js +87 -8
  226. package/dist/builtins/sys/echo.js.map +1 -1
  227. package/dist/builtins/sys/fortune.d.ts +27 -2
  228. package/dist/builtins/sys/fortune.js +44 -2
  229. package/dist/builtins/sys/fortune.js.map +1 -1
  230. package/dist/builtins/sys/grep.d.ts +245 -11
  231. package/dist/builtins/sys/grep.js +418 -131
  232. package/dist/builtins/sys/grep.js.map +1 -1
  233. package/dist/builtins/sys/joblets.d.ts +66 -7
  234. package/dist/builtins/sys/joblets.js +101 -14
  235. package/dist/builtins/sys/joblets.js.map +1 -1
  236. package/dist/builtins/sys/motd.d.ts +37 -3
  237. package/dist/builtins/sys/motd.js +49 -8
  238. package/dist/builtins/sys/motd.js.map +1 -1
  239. package/dist/builtins/sys/notes.d.ts +75 -3
  240. package/dist/builtins/sys/notes.js +90 -29
  241. package/dist/builtins/sys/notes.js.map +1 -1
  242. package/dist/builtins/sys/physicalmode.d.ts +24 -3
  243. package/dist/builtins/sys/physicalmode.js +68 -14
  244. package/dist/builtins/sys/physicalmode.js.map +1 -1
  245. package/dist/builtins/sys/tasks.d.ts +74 -5
  246. package/dist/builtins/sys/tasks.js +102 -14
  247. package/dist/builtins/sys/tasks.js.map +1 -1
  248. package/dist/builtins/sys/textFilters.d.ts +673 -41
  249. package/dist/builtins/sys/textFilters.js +718 -263
  250. package/dist/builtins/sys/textFilters.js.map +1 -1
  251. package/dist/builtins/sys/timing.d.ts +24 -3
  252. package/dist/builtins/sys/timing.js +67 -14
  253. package/dist/builtins/sys/timing.js.map +1 -1
  254. package/dist/builtins/sys/variables.d.ts +70 -4
  255. package/dist/builtins/sys/variables.js +103 -31
  256. package/dist/builtins/sys/variables.js.map +1 -1
  257. package/dist/builtins/sys/version.d.ts +27 -2
  258. package/dist/builtins/sys/version.js +48 -3
  259. package/dist/builtins/sys/version.js.map +1 -1
  260. package/dist/builtins/sys/weather.d.ts +92 -15
  261. package/dist/builtins/sys/weather.js +71 -45
  262. package/dist/builtins/sys/weather.js.map +1 -1
  263. package/dist/builtins/sys/whoami.d.ts +38 -18
  264. package/dist/builtins/sys/whoami.js +112 -8
  265. package/dist/builtins/sys/whoami.js.map +1 -1
  266. package/dist/builtins/utils.d.ts +0 -37
  267. package/dist/builtins/utils.js +0 -86
  268. package/dist/builtins/utils.js.map +1 -1
  269. package/dist/chris/chrisCommands.js +58 -152
  270. package/dist/chris/chrisCommands.js.map +1 -1
  271. package/dist/chris/commandFallback.d.ts +12 -0
  272. package/dist/chris/commandFallback.js +47 -0
  273. package/dist/chris/commandFallback.js.map +1 -1
  274. package/dist/chris/filesystem.js +7 -5
  275. package/dist/chris/filesystem.js.map +1 -1
  276. package/dist/chris/help.js +0 -1018
  277. package/dist/chris/help.js.map +1 -1
  278. package/dist/chris/kinds.d.ts +21 -0
  279. package/dist/chris/kinds.js +114 -2
  280. package/dist/chris/kinds.js.map +1 -1
  281. package/dist/chris/mounts.d.ts +4 -4
  282. package/dist/chris/mounts.js +9 -16
  283. package/dist/chris/mounts.js.map +1 -1
  284. package/dist/chris/navigation.d.ts +2 -3
  285. package/dist/chris/navigation.js +6 -20
  286. package/dist/chris/navigation.js.map +1 -1
  287. package/dist/chris/pacsResources.d.ts +259 -0
  288. package/dist/chris/pacsResources.js +168 -0
  289. package/dist/chris/pacsResources.js.map +1 -0
  290. package/dist/core/commandDeclaration.d.ts +97 -7
  291. package/dist/core/commandDeclaration.js +21 -0
  292. package/dist/core/commandDeclaration.js.map +1 -1
  293. package/dist/core/commandParse.js +65 -17
  294. package/dist/core/commandParse.js.map +1 -1
  295. package/dist/core/commandRegistry.d.ts +4 -3
  296. package/dist/core/commandRegistry.js +36 -8
  297. package/dist/core/commandRegistry.js.map +1 -1
  298. package/dist/core/commandSchema.js +5 -2
  299. package/dist/core/commandSchema.js.map +1 -1
  300. package/dist/core/commandUsage.d.ts +15 -0
  301. package/dist/core/commandUsage.js +59 -7
  302. package/dist/core/commandUsage.js.map +1 -1
  303. package/dist/core/coreCommands.js +63 -212
  304. package/dist/core/coreCommands.js.map +1 -1
  305. package/dist/core/paths.d.ts +29 -1
  306. package/dist/core/paths.js +15 -2
  307. package/dist/core/paths.js.map +1 -1
  308. package/dist/core/preprocess.d.ts +3 -4
  309. package/dist/core/preprocess.js +4 -5
  310. package/dist/core/preprocess.js.map +1 -1
  311. package/dist/lib/completer/declared.js +7 -4
  312. package/dist/lib/completer/declared.js.map +1 -1
  313. package/dist/lib/completer/index.js +2 -7
  314. package/dist/lib/completer/index.js.map +1 -1
  315. package/dist/lib/parser.d.ts +0 -8
  316. package/dist/lib/parser.js +0 -11
  317. package/dist/lib/parser.js.map +1 -1
  318. package/dist/lib/vfs/vfs.d.ts +2 -1
  319. package/dist/lib/vfs/vfs.js +5 -4
  320. package/dist/lib/vfs/vfs.js.map +1 -1
  321. package/dist/notes.json +1 -1
  322. package/package.json +3 -3
@@ -1,62 +1,451 @@
1
- import { CommandEnvelope } from '@fnndsc/menu';
2
- /** One text a filter reads: the pipe's, or a file's under its name. */
1
+ import { type CommandEnvelope } from '@fnndsc/menu';
2
+ /**
3
+ * One text a filter reads: the pipe's, or a file's under its name.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * const source: FilterSource = { name: 'notes.txt', text: 'a\nb\n' };
8
+ * ```
9
+ */
3
10
  export interface FilterSource {
4
11
  /** The operand as typed; null for the pipe. */
5
12
  name: string | null;
13
+ /** What it holds. */
6
14
  text: string;
7
15
  }
8
- /** A line's words read by one filter: what it asks, its operands, or what it does not take. */
9
- interface FilterParse<T> {
10
- ask: T;
11
- operands: string[];
12
- /** A flag this builtin does not take: the line is the system program's. */
13
- foreign: string | null;
14
- /** A flag taken but given wrong: said by name. */
15
- refused: string | null;
16
+ /**
17
+ * The file operand every filter but `uniq` takes.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const GRAMMAR = { operands: [FILES_OPERAND] } as const satisfies CommandGrammar;
22
+ * ```
23
+ */
24
+ export declare const FILES_OPERAND: {
25
+ readonly name: "files";
26
+ readonly kind: "cfsPath";
27
+ readonly optional: true;
28
+ readonly repeat: true;
29
+ readonly glob: true;
30
+ readonly summary: "ChRIS files to read, in order (a wildcard matches paths; - is the pipe); the pipe when none is named";
31
+ };
32
+ /**
33
+ * The lines of a text, without the last line's newline.
34
+ *
35
+ * @param text - The text.
36
+ * @returns Its lines; none for the empty text.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * lines_split('a\nb\n'); // ['a', 'b']
41
+ * ```
42
+ */
43
+ export declare function lines_split(text: string): string[];
44
+ /**
45
+ * Lines written back as text, each ended by a newline.
46
+ *
47
+ * @param lines - The lines.
48
+ * @returns The text; empty for no lines.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * lines_join(['a', 'b']); // 'a\nb\n'
53
+ * ```
54
+ */
55
+ export declare function lines_join(lines: ReadonlyArray<string>): string;
56
+ /**
57
+ * A word as a POSIX shell reads it back.
58
+ *
59
+ * @param word - The word.
60
+ * @returns The word, quoted when the shell would read it otherwise.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * word_quote("it's"); // "'it'\\''s'"
65
+ * ```
66
+ */
67
+ export declare function word_quote(word: string): string;
68
+ /**
69
+ * What a filter read: the sources, in order, and what could not be read.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * const read: FilterRead = { sources: [{ name: 'a.txt', text: 'a\n' }], errors: 'wc: b.txt: no such file\n' };
74
+ * ```
75
+ */
76
+ export interface FilterRead {
77
+ /** The texts read. */
78
+ sources: FilterSource[];
79
+ /** A line per operand that could not be read; empty when all were. */
80
+ errors: string;
16
81
  }
17
- /** What `wc` counts. */
82
+ /**
83
+ * Reads one ChRIS file through the one store-path resolver, under its name as typed.
84
+ *
85
+ * @param command - The filter's name, for what it says.
86
+ * @param operand - The path as typed.
87
+ * @returns The source, or the line that says why it could not be read.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * await filterFile_read('wc', 'notes.txt'); // { name: 'notes.txt', text: '…' }
92
+ * ```
93
+ */
94
+ export declare function filterFile_read(command: string, operand: string): Promise<FilterSource | {
95
+ error: string;
96
+ }>;
97
+ /**
98
+ * Reads what a filter works on: the files named, in order (`-` is the
99
+ * pipe), else what was piped in.
100
+ *
101
+ * @param command - The filter's name, for what it says.
102
+ * @param operands - The file operands.
103
+ * @returns The sources and what could not be read, or a refusal when there is nothing at all.
104
+ *
105
+ * @example
106
+ * ```ts
107
+ * await filterSources_read('wc', ['a.txt', '-']);
108
+ * ```
109
+ */
110
+ export declare function filterSources_read(command: string, operands: ReadonlyArray<string>): Promise<FilterRead | {
111
+ refusal: string;
112
+ }>;
113
+ /**
114
+ * A filter's answer over what it read: the output, with what could not be
115
+ * read on the error channel (exit 1).
116
+ *
117
+ * @param read - What was read.
118
+ * @param answer - Turns the sources into the filter's output.
119
+ * @returns The envelope.
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * filterRead_answer(read, (sources: FilterSource[]): string => wc_render(ask, sources));
124
+ * ```
125
+ */
126
+ export declare function filterRead_answer(read: FilterRead, answer: (sources: FilterSource[]) => string): CommandEnvelope;
127
+ /**
128
+ * Runs a filter: reads its sources and answers them; a file it cannot read
129
+ * is said by name, and the others are still answered.
130
+ *
131
+ * @param command - The filter's name.
132
+ * @param files - The file operands (`-` is the pipe); none for the pipe alone.
133
+ * @param answer - Turns the sources into the filter's output.
134
+ * @returns The envelope: the output, with what could not be read on the error channel.
135
+ *
136
+ * @example
137
+ * ```ts
138
+ * await filter_run('wc', ['notes.txt'], (sources: FilterSource[]): string => wc_render(ask, sources));
139
+ * ```
140
+ */
141
+ export declare function filter_run(command: string, files: ReadonlyArray<string>, answer: (sources: FilterSource[]) => string): Promise<CommandEnvelope>;
142
+ /**
143
+ * What `wc` counts.
144
+ *
145
+ * @example
146
+ * ```ts
147
+ * const ask: WcAsk = { lines: true, words: false, bytes: false, chars: false };
148
+ * ```
149
+ */
18
150
  export interface WcAsk {
151
+ /** Newlines. */
19
152
  lines: boolean;
153
+ /** Words between blanks. */
20
154
  words: boolean;
155
+ /** Bytes. */
21
156
  bytes: boolean;
157
+ /** Characters. */
22
158
  chars: boolean;
23
159
  }
24
- /** One source's counts. */
160
+ /**
161
+ * One source's counts.
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * const counts: WcCounts = wc_count('a b\n');
166
+ * ```
167
+ */
25
168
  export interface WcCounts {
169
+ /** Newlines. */
26
170
  lines: number;
171
+ /** Words between blanks. */
27
172
  words: number;
173
+ /** Bytes, in UTF-8. */
28
174
  bytes: number;
175
+ /** Characters. */
29
176
  chars: number;
30
177
  }
31
- /** Counts a text as `wc` does: newlines, words between blanks, bytes, characters. */
178
+ /**
179
+ * Counts a text as `wc` does: newlines, words between blanks, bytes, characters.
180
+ *
181
+ * @param text - The text.
182
+ * @returns Its counts.
183
+ *
184
+ * @example
185
+ * ```ts
186
+ * wc_count('héllo\n'); // { lines: 1, words: 1, bytes: 7, chars: 6 }
187
+ * ```
188
+ */
32
189
  export declare function wc_count(text: string): WcCounts;
33
- /** Reads `wc`'s words. */
34
- export declare function wcArgs_parse(args: ReadonlyArray<string>): FilterParse<WcAsk>;
35
- /** `wc`'s answer: a row per source (and a total for more than one), counts in POSIX order. */
190
+ /**
191
+ * `wc`'s answer: a row per source (and a total for more than one), counts in POSIX order.
192
+ *
193
+ * @param ask - What to count.
194
+ * @param sources - The sources.
195
+ * @returns The rows.
196
+ *
197
+ * @example
198
+ * ```ts
199
+ * wc_render({ lines: true, words: false, bytes: false, chars: false }, [{ name: null, text: 'a\n' }]); // '1\n'
200
+ * ```
201
+ */
36
202
  export declare function wc_render(ask: WcAsk, sources: ReadonlyArray<FilterSource>): string;
37
- /** `wc [-lwcm] [FILE]...` */
203
+ /**
204
+ * `wc [-lwcm] [FILE]...`: the declaration.
205
+ *
206
+ * @example
207
+ * ```ts
208
+ * commands_register({ declarations: [wcCommand] });
209
+ * ```
210
+ */
211
+ export declare const wcCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
212
+ readonly operands: readonly [{
213
+ readonly name: "files";
214
+ readonly kind: "cfsPath";
215
+ readonly optional: true;
216
+ readonly repeat: true;
217
+ readonly glob: true;
218
+ readonly summary: "ChRIS files to read, in order (a wildcard matches paths; - is the pipe); the pipe when none is named";
219
+ }];
220
+ readonly options: {
221
+ readonly lines: {
222
+ readonly short: "l";
223
+ readonly long: "lines";
224
+ readonly summary: "Count lines";
225
+ };
226
+ readonly words: {
227
+ readonly short: "w";
228
+ readonly long: "words";
229
+ readonly summary: "Count words";
230
+ };
231
+ readonly bytes: {
232
+ readonly short: "c";
233
+ readonly long: "bytes";
234
+ readonly summary: "Count bytes";
235
+ };
236
+ readonly chars: {
237
+ readonly short: "m";
238
+ readonly long: "chars";
239
+ readonly summary: "Count characters";
240
+ };
241
+ };
242
+ }>;
243
+ /**
244
+ * `wc` over words already split: the declaration's parse and handler.
245
+ *
246
+ * @param args - The words after `wc`.
247
+ * @returns The counts, or the refusal of a bad line.
248
+ *
249
+ * @example
250
+ * ```ts
251
+ * await builtin_wc(['-l', 'notes.txt']);
252
+ * ```
253
+ */
38
254
  export declare function builtin_wc(args: string[]): Promise<CommandEnvelope>;
39
- /** How many lines `head` or `tail` keeps: the first or last N, all but the last N, or from line N on. */
255
+ /**
256
+ * How much `head` or `tail` keeps: the first or last N lines (or bytes), all
257
+ * but the last N, or from line (or byte) N on.
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * const ask: EndsAsk = { count: 5, butLast: false, fromLine: false, bytes: false };
262
+ * ```
263
+ */
40
264
  export interface EndsAsk {
265
+ /** N. */
41
266
  count: number;
267
+ /** head -n -N (or -c -N): all but the last N. */
42
268
  butLast: boolean;
269
+ /** tail -n +N (or -c +N): from line (or byte) N on. */
43
270
  fromLine: boolean;
271
+ /** -c: N counts bytes, not lines. */
272
+ bytes: boolean;
44
273
  }
45
- /** Reads `head`'s or `tail`'s words: `-n N`, `-N`, and for head `-n -N`, for tail `-n +N`. */
46
- export declare function endsArgs_parse(command: 'head' | 'tail', args: ReadonlyArray<string>): FilterParse<EndsAsk>;
47
- /** The lines `head` keeps of a text. */
274
+ /**
275
+ * The lines `head` keeps of a text.
276
+ *
277
+ * @param ask - How many.
278
+ * @param text - The text.
279
+ * @returns The kept lines.
280
+ *
281
+ * @example
282
+ * ```ts
283
+ * head_lines({ count: 1, butLast: false, fromLine: false, bytes: false }, 'a\nb\n'); // ['a']
284
+ * ```
285
+ */
48
286
  export declare function head_lines(ask: EndsAsk, text: string): string[];
49
- /** The lines `tail` keeps of a text. */
287
+ /**
288
+ * The lines `tail` keeps of a text.
289
+ *
290
+ * @param ask - How many.
291
+ * @param text - The text.
292
+ * @returns The kept lines.
293
+ *
294
+ * @example
295
+ * ```ts
296
+ * tail_lines({ count: 1, butLast: false, fromLine: false, bytes: false }, 'a\nb\n'); // ['b']
297
+ * ```
298
+ */
50
299
  export declare function tail_lines(ask: EndsAsk, text: string): string[];
51
- /** `head [-n N | -N] [FILE]...` */
300
+ /**
301
+ * The bytes `head -c` keeps of a text, as text.
302
+ *
303
+ * @param ask - How many.
304
+ * @param text - The text.
305
+ * @returns The kept bytes.
306
+ *
307
+ * @example
308
+ * ```ts
309
+ * head_bytes({ count: 3, butLast: false, fromLine: false, bytes: true }, 'hello\n'); // 'hel'
310
+ * ```
311
+ */
312
+ export declare function head_bytes(ask: EndsAsk, text: string): string;
313
+ /**
314
+ * The bytes `tail -c` keeps of a text, as text.
315
+ *
316
+ * @param ask - How many.
317
+ * @param text - The text.
318
+ * @returns The kept bytes.
319
+ *
320
+ * @example
321
+ * ```ts
322
+ * tail_bytes({ count: 3, butLast: false, fromLine: false, bytes: true }, 'hello\n'); // 'lo\n'
323
+ * ```
324
+ */
325
+ export declare function tail_bytes(ask: EndsAsk, text: string): string;
326
+ /**
327
+ * `head [-n N | -N | -c N] [FILE]...`: the declaration.
328
+ *
329
+ * @example
330
+ * ```ts
331
+ * commands_register({ declarations: [headCommand] });
332
+ * ```
333
+ */
334
+ export declare const headCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
335
+ readonly operands: readonly [{
336
+ readonly name: "files";
337
+ readonly kind: "cfsPath";
338
+ readonly optional: true;
339
+ readonly repeat: true;
340
+ readonly glob: true;
341
+ readonly summary: "ChRIS files to read, in order (a wildcard matches paths; - is the pipe); the pipe when none is named";
342
+ }];
343
+ readonly options: {
344
+ readonly lines: {
345
+ readonly short: "n";
346
+ readonly long: "lines";
347
+ readonly numeral: true;
348
+ readonly value: {
349
+ readonly name: "count";
350
+ readonly kind: "word";
351
+ };
352
+ readonly summary: "The first N lines (-N says the same); -n -N: all but the last N";
353
+ };
354
+ readonly bytes: {
355
+ readonly short: "c";
356
+ readonly long: "bytes";
357
+ readonly value: {
358
+ readonly name: "count";
359
+ readonly kind: "word";
360
+ };
361
+ readonly summary: "The first N bytes; -c -N: all but the last N";
362
+ };
363
+ };
364
+ }>;
365
+ /**
366
+ * `tail [-n N | -N | -n +N | -c N] [-f] [FILE]...`: the declaration.
367
+ *
368
+ * @example
369
+ * ```ts
370
+ * commands_register({ declarations: [tailCommand] });
371
+ * ```
372
+ */
373
+ export declare const tailCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
374
+ readonly operands: readonly [{
375
+ readonly name: "files";
376
+ readonly kind: "cfsPath";
377
+ readonly optional: true;
378
+ readonly repeat: true;
379
+ readonly glob: true;
380
+ readonly summary: "ChRIS files to read, in order (a wildcard matches paths; - is the pipe); the pipe when none is named";
381
+ }];
382
+ readonly options: {
383
+ readonly lines: {
384
+ readonly short: "n";
385
+ readonly long: "lines";
386
+ readonly numeral: true;
387
+ readonly value: {
388
+ readonly name: "count";
389
+ readonly kind: "word";
390
+ };
391
+ readonly summary: "The last N lines (-N says the same); -n +N: from line N to the end";
392
+ };
393
+ readonly bytes: {
394
+ readonly short: "c";
395
+ readonly long: "bytes";
396
+ readonly value: {
397
+ readonly name: "count";
398
+ readonly kind: "word";
399
+ };
400
+ readonly summary: "The last N bytes; -c +N: from byte N to the end";
401
+ };
402
+ readonly follow: {
403
+ readonly short: "f";
404
+ readonly long: "follow";
405
+ readonly summary: "Taken: the text is read once and its last lines shown; a ChRIS file or a pipe is not followed";
406
+ };
407
+ };
408
+ }>;
409
+ /**
410
+ * `head` over words already split: the declaration's parse and handler.
411
+ *
412
+ * @param args - The words after `head`.
413
+ * @returns The lines, or the refusal of a bad line.
414
+ *
415
+ * @example
416
+ * ```ts
417
+ * await builtin_head(['-5', 'notes.txt']);
418
+ * ```
419
+ */
52
420
  export declare function builtin_head(args: string[]): Promise<CommandEnvelope>;
53
- /** `tail [-n N | -N | -n +N] [FILE]...` */
421
+ /**
422
+ * `tail` over words already split: the declaration's parse and handler.
423
+ *
424
+ * @param args - The words after `tail`.
425
+ * @returns The lines, or the refusal of a bad line.
426
+ *
427
+ * @example
428
+ * ```ts
429
+ * await builtin_tail(['-n', '+2', 'a.csv']);
430
+ * ```
431
+ */
54
432
  export declare function builtin_tail(args: string[]): Promise<CommandEnvelope>;
55
- /** How `sort` orders. */
433
+ /**
434
+ * How `sort` orders.
435
+ *
436
+ * @example
437
+ * ```ts
438
+ * const ask: SortAsk = { reverse: false, compare: 'numeric', fold: false, unique: false, key: { from: 2, to: null }, separator: ',' };
439
+ * ```
440
+ */
56
441
  export interface SortAsk {
442
+ /** Reverse the order. */
57
443
  reverse: boolean;
58
- numeric: boolean;
444
+ /** How two keys compare: as text, by number (-n), by human size (-h, 2K < 1M), or by version (-V, digit runs as numbers). */
445
+ compare: 'text' | 'numeric' | 'human' | 'version';
446
+ /** Ignore case. */
59
447
  fold: boolean;
448
+ /** One of each equal line. */
60
449
  unique: boolean;
61
450
  /** The key's fields, 1-based, inclusive; null for the whole line. */
62
451
  key: {
@@ -66,26 +455,189 @@ export interface SortAsk {
66
455
  /** The field separator; null for runs of blanks. */
67
456
  separator: string | null;
68
457
  }
69
- /** Reads `sort`'s words. */
70
- export declare function sortArgs_parse(args: ReadonlyArray<string>): FilterParse<SortAsk>;
71
- /** The lines in `sort`'s order: stable, by key, numeric or text, then reversed, then unique by key. */
458
+ /**
459
+ * The lines in `sort`'s order: stable, by key, as text, number, size or version, then reversed, then unique by key.
460
+ *
461
+ * @param ask - How it orders.
462
+ * @param lines - The lines.
463
+ * @returns The lines in order.
464
+ *
465
+ * @example
466
+ * ```ts
467
+ * sort_lines({ reverse: false, compare: 'human', fold: false, unique: false, key: null, separator: null }, ['1M', '2K']); // ['2K', '1M']
468
+ * ```
469
+ */
72
470
  export declare function sort_lines(ask: SortAsk, lines: ReadonlyArray<string>): string[];
73
- /** `sort [-rnfu] [-k N[,M]] [-t C] [FILE]...` */
471
+ /**
472
+ * `sort [-rnhVfu] [-k N[,M]] [-t C] [FILE]...`: the declaration.
473
+ *
474
+ * @example
475
+ * ```ts
476
+ * commands_register({ declarations: [sortCommand] });
477
+ * ```
478
+ */
479
+ export declare const sortCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
480
+ readonly operands: readonly [{
481
+ readonly name: "files";
482
+ readonly kind: "cfsPath";
483
+ readonly optional: true;
484
+ readonly repeat: true;
485
+ readonly glob: true;
486
+ readonly summary: "ChRIS files to read, in order (a wildcard matches paths; - is the pipe); the pipe when none is named";
487
+ }];
488
+ readonly options: {
489
+ readonly reverse: {
490
+ readonly short: "r";
491
+ readonly long: "reverse";
492
+ readonly summary: "Reverse the order";
493
+ };
494
+ readonly numeric: {
495
+ readonly short: "n";
496
+ readonly long: "numeric-sort";
497
+ readonly summary: "Compare by number";
498
+ };
499
+ readonly human: {
500
+ readonly short: "h";
501
+ readonly long: "human-numeric-sort";
502
+ readonly summary: "Compare human sizes: 2K < 1M < 3G";
503
+ };
504
+ readonly version: {
505
+ readonly short: "V";
506
+ readonly long: "version-sort";
507
+ readonly summary: "Compare versions: runs of digits as numbers (v2 < v10)";
508
+ };
509
+ readonly fold: {
510
+ readonly short: "f";
511
+ readonly long: "ignore-case";
512
+ readonly summary: "Ignore case";
513
+ };
514
+ readonly unique: {
515
+ readonly short: "u";
516
+ readonly long: "unique";
517
+ readonly summary: "One of each equal line";
518
+ };
519
+ readonly key: {
520
+ readonly short: "k";
521
+ readonly long: "key";
522
+ readonly value: {
523
+ readonly name: "N[,M]";
524
+ readonly kind: "word";
525
+ };
526
+ readonly summary: "Compare fields N to M (to the end without M)";
527
+ };
528
+ readonly separator: {
529
+ readonly short: "t";
530
+ readonly long: "field-separator";
531
+ readonly value: {
532
+ readonly name: "C";
533
+ readonly kind: "word";
534
+ };
535
+ readonly summary: "Fields split at C, not at runs of blanks";
536
+ };
537
+ };
538
+ }>;
539
+ /**
540
+ * `sort` over words already split: the declaration's parse and handler.
541
+ *
542
+ * @param args - The words after `sort`.
543
+ * @returns The lines in order, or the refusal of a bad line.
544
+ *
545
+ * @example
546
+ * ```ts
547
+ * await builtin_sort(['-t', ',', '-k', '2', 'a.csv']);
548
+ * ```
549
+ */
74
550
  export declare function builtin_sort(args: string[]): Promise<CommandEnvelope>;
75
- /** What `uniq` keeps of each run of equal lines. */
551
+ /**
552
+ * What `uniq` keeps of each run of equal lines.
553
+ *
554
+ * @example
555
+ * ```ts
556
+ * const ask: UniqAsk = { count: true, repeated: false, unique: false, fold: false };
557
+ * ```
558
+ */
76
559
  export interface UniqAsk {
560
+ /** Prefix each with its count. */
77
561
  count: boolean;
562
+ /** Only repeated lines. */
78
563
  repeated: boolean;
564
+ /** Only lines never repeated. */
79
565
  unique: boolean;
566
+ /** Ignore case. */
80
567
  fold: boolean;
81
568
  }
82
- /** Reads `uniq`'s words; one input at most, as uniq takes. */
83
- export declare function uniqArgs_parse(args: ReadonlyArray<string>): FilterParse<UniqAsk>;
84
- /** Adjacent equal lines folded to one, as `uniq` does. */
569
+ /**
570
+ * Adjacent equal lines folded to one, as `uniq` does.
571
+ *
572
+ * @param ask - What it keeps.
573
+ * @param lines - The lines.
574
+ * @returns The kept lines.
575
+ *
576
+ * @example
577
+ * ```ts
578
+ * uniq_lines({ count: false, repeated: false, unique: false, fold: false }, ['a', 'a', 'b']); // ['a', 'b']
579
+ * ```
580
+ */
85
581
  export declare function uniq_lines(ask: UniqAsk, lines: ReadonlyArray<string>): string[];
86
- /** `uniq [-cdui] [FILE]` */
582
+ /**
583
+ * `uniq [-cdui] [FILE]`: the declaration.
584
+ *
585
+ * @example
586
+ * ```ts
587
+ * commands_register({ declarations: [uniqCommand] });
588
+ * ```
589
+ */
590
+ export declare const uniqCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
591
+ readonly operands: readonly [{
592
+ readonly name: "file";
593
+ readonly kind: "cfsPath";
594
+ readonly optional: true;
595
+ readonly glob: true;
596
+ readonly summary: "A ChRIS file to read (- is the pipe); the pipe when none is named";
597
+ }];
598
+ readonly options: {
599
+ readonly count: {
600
+ readonly short: "c";
601
+ readonly long: "count";
602
+ readonly summary: "Prefix each with its count";
603
+ };
604
+ readonly repeated: {
605
+ readonly short: "d";
606
+ readonly long: "repeated";
607
+ readonly summary: "Only repeated lines";
608
+ };
609
+ readonly unique: {
610
+ readonly short: "u";
611
+ readonly long: "unique";
612
+ readonly summary: "Only lines never repeated";
613
+ };
614
+ readonly fold: {
615
+ readonly short: "i";
616
+ readonly long: "ignore-case";
617
+ readonly summary: "Ignore case";
618
+ };
619
+ };
620
+ }>;
621
+ /**
622
+ * `uniq` over words already split: the declaration's parse and handler.
623
+ *
624
+ * @param args - The words after `uniq`.
625
+ * @returns The folded lines, or the refusal of a bad line.
626
+ *
627
+ * @example
628
+ * ```ts
629
+ * await builtin_uniq(['-c']);
630
+ * ```
631
+ */
87
632
  export declare function builtin_uniq(args: string[]): Promise<CommandEnvelope>;
88
- /** What `cut` keeps of each line. */
633
+ /**
634
+ * What `cut` keeps of each line.
635
+ *
636
+ * @example
637
+ * ```ts
638
+ * const ask: CutAsk = { by: 'fields', ranges: [{ from: 1, to: 1 }], delimiter: ',', onlyDelimited: false };
639
+ * ```
640
+ */
89
641
  export interface CutAsk {
90
642
  /** Fields or characters. */
91
643
  by: 'fields' | 'chars';
@@ -94,14 +646,94 @@ export interface CutAsk {
94
646
  from: number;
95
647
  to: number | null;
96
648
  }>;
649
+ /** The field delimiter. */
97
650
  delimiter: string;
98
651
  /** With fields: drop a line that holds no delimiter. */
99
652
  onlyDelimited: boolean;
100
653
  }
101
- /** Reads `cut`'s words. */
102
- export declare function cutArgs_parse(args: ReadonlyArray<string>): FilterParse<CutAsk>;
103
- /** What `cut` keeps of each line. */
654
+ /**
655
+ * What `cut` keeps of each line.
656
+ *
657
+ * @param ask - What it keeps.
658
+ * @param lines - The lines.
659
+ * @returns The kept parts, a line each (a line with no delimiter dropped under -s).
660
+ *
661
+ * @example
662
+ * ```ts
663
+ * cut_lines({ by: 'fields', ranges: [{ from: 2, to: 2 }], delimiter: ',', onlyDelimited: false }, ['a,b']); // ['b']
664
+ * ```
665
+ */
104
666
  export declare function cut_lines(ask: CutAsk, lines: ReadonlyArray<string>): string[];
105
- /** `cut -f LIST [-d C] [-s] | -c LIST [FILE]...` */
667
+ /**
668
+ * `cut -f LIST [-d C] [-s] | -c LIST [FILE]...`: the declaration.
669
+ *
670
+ * @example
671
+ * ```ts
672
+ * commands_register({ declarations: [cutCommand] });
673
+ * ```
674
+ */
675
+ export declare const cutCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
676
+ readonly operands: readonly [{
677
+ readonly name: "files";
678
+ readonly kind: "cfsPath";
679
+ readonly optional: true;
680
+ readonly repeat: true;
681
+ readonly glob: true;
682
+ readonly summary: "ChRIS files to read, in order (a wildcard matches paths; - is the pipe); the pipe when none is named";
683
+ }];
684
+ readonly options: {
685
+ readonly fields: {
686
+ readonly short: "f";
687
+ readonly long: "fields";
688
+ readonly value: {
689
+ readonly name: "LIST";
690
+ readonly kind: "word";
691
+ };
692
+ readonly summary: "Keep these fields";
693
+ };
694
+ readonly chars: {
695
+ readonly short: "c";
696
+ readonly long: "characters";
697
+ readonly value: {
698
+ readonly name: "LIST";
699
+ readonly kind: "word";
700
+ };
701
+ readonly summary: "Keep these characters";
702
+ };
703
+ readonly bytes: {
704
+ readonly short: "b";
705
+ readonly long: "bytes";
706
+ readonly value: {
707
+ readonly name: "LIST";
708
+ readonly kind: "word";
709
+ };
710
+ readonly summary: "Keep these characters (as -c)";
711
+ };
712
+ readonly delimiter: {
713
+ readonly short: "d";
714
+ readonly long: "delimiter";
715
+ readonly value: {
716
+ readonly name: "C";
717
+ readonly kind: "word";
718
+ };
719
+ readonly summary: "The field delimiter (a tab when not said)";
720
+ };
721
+ readonly onlyDelimited: {
722
+ readonly short: "s";
723
+ readonly long: "only-delimited";
724
+ readonly summary: "Only lines that hold the delimiter";
725
+ };
726
+ };
727
+ }>;
728
+ /**
729
+ * `cut` over words already split: the declaration's parse and handler.
730
+ *
731
+ * @param args - The words after `cut`.
732
+ * @returns The kept parts, or the refusal of a bad line.
733
+ *
734
+ * @example
735
+ * ```ts
736
+ * await builtin_cut(['-d', ',', '-f', '1', 'a.csv']);
737
+ * ```
738
+ */
106
739
  export declare function builtin_cut(args: string[]): Promise<CommandEnvelope>;
107
- export {};