@fnndsc/brasa 0.56.2 → 0.56.4
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.
- package/dist/buildinfo.json +1 -1
- package/dist/builtins/berth/berth.d.ts +11 -0
- package/dist/builtins/berth/berth.js +53 -22
- package/dist/builtins/berth/berth.js.map +1 -1
- package/dist/builtins/berth/berthCube.d.ts +17 -2
- package/dist/builtins/berth/berthCube.js +22 -10
- package/dist/builtins/berth/berthCube.js.map +1 -1
- package/dist/builtins/debug.d.ts +24 -3
- package/dist/builtins/debug.js +66 -13
- package/dist/builtins/debug.js.map +1 -1
- package/dist/builtins/fs/acl.args.d.ts +5 -38
- package/dist/builtins/fs/acl.args.js +6 -72
- package/dist/builtins/fs/acl.args.js.map +1 -1
- package/dist/builtins/fs/acl.d.ts +100 -10
- package/dist/builtins/fs/acl.js +222 -68
- package/dist/builtins/fs/acl.js.map +1 -1
- package/dist/builtins/fs/cat.args.d.ts +14 -15
- package/dist/builtins/fs/cat.args.js +13 -40
- package/dist/builtins/fs/cat.args.js.map +1 -1
- package/dist/builtins/fs/cat.d.ts +40 -3
- package/dist/builtins/fs/cat.js +89 -10
- package/dist/builtins/fs/cat.js.map +1 -1
- package/dist/builtins/fs/cd.d.ts +24 -6
- package/dist/builtins/fs/cd.js +71 -18
- package/dist/builtins/fs/cd.js.map +1 -1
- package/dist/builtins/fs/configWrite.d.ts +24 -8
- package/dist/builtins/fs/configWrite.js +77 -36
- package/dist/builtins/fs/configWrite.js.map +1 -1
- package/dist/builtins/fs/cp.d.ts +39 -4
- package/dist/builtins/fs/cp.js +120 -55
- package/dist/builtins/fs/cp.js.map +1 -1
- package/dist/builtins/fs/download.d.ts +12 -1
- package/dist/builtins/fs/download.js +24 -4
- package/dist/builtins/fs/download.js.map +1 -1
- package/dist/builtins/fs/du.d.ts +59 -33
- package/dist/builtins/fs/du.js +111 -79
- package/dist/builtins/fs/du.js.map +1 -1
- package/dist/builtins/fs/edit.d.ts +19 -4
- package/dist/builtins/fs/edit.js +77 -16
- package/dist/builtins/fs/edit.js.map +1 -1
- package/dist/builtins/fs/find.d.ts +25 -0
- package/dist/builtins/fs/find.js +76 -5
- package/dist/builtins/fs/find.js.map +1 -1
- package/dist/builtins/fs/mkdir.d.ts +28 -18
- package/dist/builtins/fs/mkdir.js +95 -66
- package/dist/builtins/fs/mkdir.js.map +1 -1
- package/dist/builtins/fs/mv.d.ts +34 -4
- package/dist/builtins/fs/mv.js +129 -64
- package/dist/builtins/fs/mv.js.map +1 -1
- package/dist/builtins/fs/pull.args.d.ts +56 -17
- package/dist/builtins/fs/pull.args.js +16 -66
- package/dist/builtins/fs/pull.args.js.map +1 -1
- package/dist/builtins/fs/pull.d.ts +62 -0
- package/dist/builtins/fs/pull.js +86 -22
- package/dist/builtins/fs/pull.js.map +1 -1
- package/dist/builtins/fs/pwd.d.ts +19 -5
- package/dist/builtins/fs/pwd.js +62 -8
- package/dist/builtins/fs/pwd.js.map +1 -1
- package/dist/builtins/fs/rm.d.ts +58 -21
- package/dist/builtins/fs/rm.js +99 -82
- package/dist/builtins/fs/rm.js.map +1 -1
- package/dist/builtins/fs/rmdir.d.ts +29 -11
- package/dist/builtins/fs/rmdir.js +87 -36
- package/dist/builtins/fs/rmdir.js.map +1 -1
- package/dist/builtins/fs/touch.d.ts +44 -9
- package/dist/builtins/fs/touch.js +91 -27
- package/dist/builtins/fs/touch.js.map +1 -1
- package/dist/builtins/fs/transferJobs.d.ts +64 -0
- package/dist/builtins/fs/transferJobs.js +98 -0
- package/dist/builtins/fs/transferJobs.js.map +1 -0
- package/dist/builtins/fs/tree.d.ts +36 -9
- package/dist/builtins/fs/tree.js +126 -36
- package/dist/builtins/fs/tree.js.map +1 -1
- package/dist/builtins/fs/upload.d.ts +35 -3
- package/dist/builtins/fs/upload.js +99 -14
- package/dist/builtins/fs/upload.js.map +1 -1
- package/dist/builtins/fs/xattr.args.d.ts +12 -33
- package/dist/builtins/fs/xattr.args.js +17 -95
- package/dist/builtins/fs/xattr.args.js.map +1 -1
- package/dist/builtins/fs/xattr.d.ts +98 -8
- package/dist/builtins/fs/xattr.js +163 -24
- package/dist/builtins/fs/xattr.js.map +1 -1
- package/dist/builtins/games/bytes.d.ts +201 -5
- package/dist/builtins/games/bytes.js +255 -54
- package/dist/builtins/games/bytes.js.map +1 -1
- package/dist/builtins/games/chimes.d.ts +180 -3
- package/dist/builtins/games/chimes.js +203 -26
- package/dist/builtins/games/chimes.js.map +1 -1
- package/dist/builtins/games/chrislab.d.ts +101 -3
- package/dist/builtins/games/chrislab.js +117 -17
- package/dist/builtins/games/chrislab.js.map +1 -1
- package/dist/builtins/games/cowsay.d.ts +93 -2
- package/dist/builtins/games/cowsay.js +90 -31
- package/dist/builtins/games/cowsay.js.map +1 -1
- package/dist/builtins/games/figlet.d.ts +70 -2
- package/dist/builtins/games/figlet.js +83 -6
- package/dist/builtins/games/figlet.js.map +1 -1
- package/dist/builtins/games/lab.d.ts +104 -5
- package/dist/builtins/games/lab.js +144 -6
- package/dist/builtins/games/lab.js.map +1 -1
- package/dist/builtins/games/lolcat.d.ts +61 -1
- package/dist/builtins/games/lolcat.js +59 -24
- package/dist/builtins/games/lolcat.js.map +1 -1
- package/dist/builtins/games/morse.d.ts +36 -1
- package/dist/builtins/games/morse.js +50 -2
- package/dist/builtins/games/morse.js.map +1 -1
- package/dist/builtins/games/numbers.d.ts +241 -5
- package/dist/builtins/games/numbers.js +298 -23
- package/dist/builtins/games/numbers.js.map +1 -1
- package/dist/builtins/games/play.d.ts +96 -6
- package/dist/builtins/games/play.js +137 -6
- package/dist/builtins/games/play.js.map +1 -1
- package/dist/builtins/games/qr.d.ts +40 -1
- package/dist/builtins/games/qr.js +51 -2
- package/dist/builtins/games/qr.js.map +1 -1
- package/dist/builtins/games/show.d.ts +131 -6
- package/dist/builtins/games/show.js +208 -20
- package/dist/builtins/games/show.js.map +1 -1
- package/dist/builtins/games/sky.d.ts +178 -4
- package/dist/builtins/games/sky.js +228 -12
- package/dist/builtins/games/sky.js.map +1 -1
- package/dist/builtins/games/text.d.ts +258 -7
- package/dist/builtins/games/text.js +310 -29
- package/dist/builtins/games/text.js.map +1 -1
- package/dist/builtins/games/trek.d.ts +67 -3
- package/dist/builtins/games/trek.js +63 -10
- package/dist/builtins/games/trek.js.map +1 -1
- package/dist/builtins/games/wtf.d.ts +58 -1
- package/dist/builtins/games/wtf.js +67 -6
- package/dist/builtins/games/wtf.js.map +1 -1
- package/dist/builtins/help.d.ts +38 -2
- package/dist/builtins/help.js +76 -769
- package/dist/builtins/help.js.map +1 -1
- package/dist/builtins/helpSections.js +4 -1
- package/dist/builtins/helpSections.js.map +1 -1
- package/dist/builtins/net/connect.d.ts +36 -3
- package/dist/builtins/net/connect.js +84 -26
- package/dist/builtins/net/connect.js.map +1 -1
- package/dist/builtins/net/cubepath.d.ts +49 -5
- package/dist/builtins/net/cubepath.js +69 -27
- package/dist/builtins/net/cubepath.js.map +1 -1
- package/dist/builtins/net/logout.d.ts +13 -4
- package/dist/builtins/net/logout.js +49 -3
- package/dist/builtins/net/logout.js.map +1 -1
- package/dist/builtins/net/netstat.d.ts +29 -4
- package/dist/builtins/net/netstat.js +64 -23
- package/dist/builtins/net/netstat.js.map +1 -1
- package/dist/builtins/net/pacs.d.ts +169 -15
- package/dist/builtins/net/pacs.js +92 -33
- package/dist/builtins/net/pacs.js.map +1 -1
- package/dist/builtins/net/query.args.d.ts +95 -0
- package/dist/builtins/net/query.args.js +26 -0
- package/dist/builtins/net/query.args.js.map +1 -0
- package/dist/builtins/net/query.d.ts +98 -5
- package/dist/builtins/net/query.js +89 -83
- package/dist/builtins/net/query.js.map +1 -1
- package/dist/builtins/net/status.d.ts +5 -3
- package/dist/builtins/net/status.js +5 -12
- package/dist/builtins/net/status.js.map +1 -1
- package/dist/builtins/parametersofplugin.d.ts +82 -3
- package/dist/builtins/parametersofplugin.js +79 -23
- package/dist/builtins/parametersofplugin.js.map +1 -1
- package/dist/builtins/proc.d.ts +210 -3
- package/dist/builtins/proc.js +210 -119
- package/dist/builtins/proc.js.map +1 -1
- package/dist/builtins/res/compute.d.ts +67 -3
- package/dist/builtins/res/compute.js +121 -35
- package/dist/builtins/res/compute.js.map +1 -1
- package/dist/builtins/res/dicom.d.ts +52 -3
- package/dist/builtins/res/dicom.js +82 -34
- package/dist/builtins/res/dicom.js.map +1 -1
- package/dist/builtins/res/expect.d.ts +52 -3
- package/dist/builtins/res/expect.js +92 -29
- package/dist/builtins/res/expect.js.map +1 -1
- package/dist/builtins/res/feed.d.ts +475 -3
- package/dist/builtins/res/feed.js +253 -158
- package/dist/builtins/res/feed.js.map +1 -1
- package/dist/builtins/res/files.d.ts +517 -3
- package/dist/builtins/res/files.js +124 -44
- package/dist/builtins/res/files.js.map +1 -1
- package/dist/builtins/res/gather.d.ts +113 -3
- package/dist/builtins/res/gather.js +153 -44
- package/dist/builtins/res/gather.js.map +1 -1
- package/dist/builtins/res/gather.process.d.ts +27 -19
- package/dist/builtins/res/gather.process.js +29 -59
- package/dist/builtins/res/gather.process.js.map +1 -1
- package/dist/builtins/res/group.d.ts +284 -3
- package/dist/builtins/res/group.js +147 -76
- package/dist/builtins/res/group.js.map +1 -1
- package/dist/builtins/res/image.d.ts +30 -2
- package/dist/builtins/res/image.js +62 -10
- package/dist/builtins/res/image.js.map +1 -1
- package/dist/builtins/res/play.d.ts +71 -9
- package/dist/builtins/res/play.js +124 -82
- package/dist/builtins/res/play.js.map +1 -1
- package/dist/builtins/res/plugininstance.d.ts +307 -2
- package/dist/builtins/res/plugininstance.js +122 -50
- package/dist/builtins/res/plugininstance.js.map +1 -1
- package/dist/builtins/res/pluginmeta.d.ts +244 -2
- package/dist/builtins/res/pluginmeta.js +98 -40
- package/dist/builtins/res/pluginmeta.js.map +1 -1
- package/dist/builtins/res/record.d.ts +37 -3
- package/dist/builtins/res/record.js +127 -57
- package/dist/builtins/res/record.js.map +1 -1
- package/dist/builtins/res/resourceList.d.ts +136 -0
- package/dist/builtins/res/resourceList.js +51 -0
- package/dist/builtins/res/resourceList.js.map +1 -0
- package/dist/builtins/res/tag.d.ts +244 -3
- package/dist/builtins/res/tag.js +97 -41
- package/dist/builtins/res/tag.js.map +1 -1
- package/dist/builtins/res/user.d.ts +122 -3
- package/dist/builtins/res/user.js +83 -21
- package/dist/builtins/res/user.js.map +1 -1
- package/dist/builtins/res/workflow.d.ts +244 -2
- package/dist/builtins/res/workflow.js +97 -40
- package/dist/builtins/res/workflow.js.map +1 -1
- package/dist/builtins/store.d.ts +85 -3
- package/dist/builtins/store.js +135 -68
- package/dist/builtins/store.js.map +1 -1
- package/dist/builtins/sys/apropos.d.ts +80 -5
- package/dist/builtins/sys/apropos.js +121 -15
- package/dist/builtins/sys/apropos.js.map +1 -1
- package/dist/builtins/sys/cal.d.ts +44 -5
- package/dist/builtins/sys/cal.js +57 -10
- package/dist/builtins/sys/cal.js.map +1 -1
- package/dist/builtins/sys/command.d.ts +20 -0
- package/dist/builtins/sys/command.js +31 -0
- package/dist/builtins/sys/command.js.map +1 -1
- package/dist/builtins/sys/context.d.ts +13 -3
- package/dist/builtins/sys/context.js +51 -4
- package/dist/builtins/sys/context.js.map +1 -1
- package/dist/builtins/sys/date.d.ts +56 -5
- package/dist/builtins/sys/date.js +63 -9
- package/dist/builtins/sys/date.js.map +1 -1
- package/dist/builtins/sys/echo.d.ts +63 -2
- package/dist/builtins/sys/echo.js +87 -8
- package/dist/builtins/sys/echo.js.map +1 -1
- package/dist/builtins/sys/fortune.d.ts +27 -2
- package/dist/builtins/sys/fortune.js +44 -2
- package/dist/builtins/sys/fortune.js.map +1 -1
- package/dist/builtins/sys/grep.d.ts +245 -11
- package/dist/builtins/sys/grep.js +418 -131
- package/dist/builtins/sys/grep.js.map +1 -1
- package/dist/builtins/sys/joblets.d.ts +66 -7
- package/dist/builtins/sys/joblets.js +101 -14
- package/dist/builtins/sys/joblets.js.map +1 -1
- package/dist/builtins/sys/motd.d.ts +37 -3
- package/dist/builtins/sys/motd.js +49 -8
- package/dist/builtins/sys/motd.js.map +1 -1
- package/dist/builtins/sys/notes.d.ts +75 -3
- package/dist/builtins/sys/notes.js +90 -29
- package/dist/builtins/sys/notes.js.map +1 -1
- package/dist/builtins/sys/physicalmode.d.ts +24 -3
- package/dist/builtins/sys/physicalmode.js +68 -14
- package/dist/builtins/sys/physicalmode.js.map +1 -1
- package/dist/builtins/sys/tasks.d.ts +74 -5
- package/dist/builtins/sys/tasks.js +102 -14
- package/dist/builtins/sys/tasks.js.map +1 -1
- package/dist/builtins/sys/textFilters.d.ts +673 -41
- package/dist/builtins/sys/textFilters.js +718 -263
- package/dist/builtins/sys/textFilters.js.map +1 -1
- package/dist/builtins/sys/timing.d.ts +24 -3
- package/dist/builtins/sys/timing.js +67 -14
- package/dist/builtins/sys/timing.js.map +1 -1
- package/dist/builtins/sys/variables.d.ts +70 -4
- package/dist/builtins/sys/variables.js +103 -31
- package/dist/builtins/sys/variables.js.map +1 -1
- package/dist/builtins/sys/version.d.ts +27 -2
- package/dist/builtins/sys/version.js +48 -3
- package/dist/builtins/sys/version.js.map +1 -1
- package/dist/builtins/sys/weather.d.ts +92 -15
- package/dist/builtins/sys/weather.js +71 -45
- package/dist/builtins/sys/weather.js.map +1 -1
- package/dist/builtins/sys/whoami.d.ts +38 -18
- package/dist/builtins/sys/whoami.js +112 -8
- package/dist/builtins/sys/whoami.js.map +1 -1
- package/dist/builtins/utils.d.ts +0 -37
- package/dist/builtins/utils.js +0 -86
- package/dist/builtins/utils.js.map +1 -1
- package/dist/chris/chrisCommands.js +58 -152
- package/dist/chris/chrisCommands.js.map +1 -1
- package/dist/chris/commandFallback.d.ts +12 -0
- package/dist/chris/commandFallback.js +47 -0
- package/dist/chris/commandFallback.js.map +1 -1
- package/dist/chris/filesystem.js +7 -5
- package/dist/chris/filesystem.js.map +1 -1
- package/dist/chris/help.js +0 -1018
- package/dist/chris/help.js.map +1 -1
- package/dist/chris/kinds.d.ts +21 -0
- package/dist/chris/kinds.js +114 -2
- package/dist/chris/kinds.js.map +1 -1
- package/dist/chris/mounts.d.ts +4 -4
- package/dist/chris/mounts.js +9 -16
- package/dist/chris/mounts.js.map +1 -1
- package/dist/chris/navigation.d.ts +2 -3
- package/dist/chris/navigation.js +6 -20
- package/dist/chris/navigation.js.map +1 -1
- package/dist/chris/pacsResources.d.ts +259 -0
- package/dist/chris/pacsResources.js +168 -0
- package/dist/chris/pacsResources.js.map +1 -0
- package/dist/core/commandDeclaration.d.ts +97 -7
- package/dist/core/commandDeclaration.js +21 -0
- package/dist/core/commandDeclaration.js.map +1 -1
- package/dist/core/commandParse.js +65 -17
- package/dist/core/commandParse.js.map +1 -1
- package/dist/core/commandRegistry.d.ts +4 -3
- package/dist/core/commandRegistry.js +36 -8
- package/dist/core/commandRegistry.js.map +1 -1
- package/dist/core/commandSchema.js +5 -2
- package/dist/core/commandSchema.js.map +1 -1
- package/dist/core/commandUsage.d.ts +15 -0
- package/dist/core/commandUsage.js +59 -7
- package/dist/core/commandUsage.js.map +1 -1
- package/dist/core/coreCommands.js +63 -212
- package/dist/core/coreCommands.js.map +1 -1
- package/dist/core/paths.d.ts +29 -1
- package/dist/core/paths.js +15 -2
- package/dist/core/paths.js.map +1 -1
- package/dist/core/preprocess.d.ts +3 -4
- package/dist/core/preprocess.js +4 -5
- package/dist/core/preprocess.js.map +1 -1
- package/dist/lib/completer/declared.js +7 -4
- package/dist/lib/completer/declared.js.map +1 -1
- package/dist/lib/completer/index.js +2 -7
- package/dist/lib/completer/index.js.map +1 -1
- package/dist/lib/parser.d.ts +0 -8
- package/dist/lib/parser.js +0 -11
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/vfs/vfs.d.ts +2 -1
- package/dist/lib/vfs/vfs.js +5 -4
- package/dist/lib/vfs/vfs.js.map +1 -1
- package/dist/notes.json +1 -1
- package/package.json +5 -5
package/dist/builtins/help.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Command help system.
|
|
3
3
|
*
|
|
4
|
-
* Provides help text for shell commands
|
|
4
|
+
* Provides help text for shell commands, and the `help` command itself,
|
|
5
|
+
* declared in one record (`helpCommand`). A declared command's page comes
|
|
6
|
+
* from its declaration; `helpText` holds the pages of the rest.
|
|
5
7
|
*
|
|
6
8
|
* @module
|
|
7
9
|
*/
|
|
@@ -9,10 +11,10 @@ import { variablesPage_render } from './variablesPage.js';
|
|
|
9
11
|
import { HELP_SECTIONS, helpPosix_render, helpSection_render, helpToc_render, section_find, shellTopic_render } from './helpSections.js';
|
|
10
12
|
import { gamesShelf_render, gamesShelf_names } from './games/shelf.js';
|
|
11
13
|
import chalk from 'chalk';
|
|
12
|
-
import { CAT_USAGE } from './fs/cat.args.js';
|
|
13
14
|
import { commands_register, commandDeclaration_get, commandHelpEntry_get, helpTopic_names, builtinCommand_has } from '../core/commandRegistry.js';
|
|
14
|
-
import { declaration_isParsed } from '../core/commandDeclaration.js';
|
|
15
|
-
import {
|
|
15
|
+
import { command_declare, declaration_isParsed, } from '../core/commandDeclaration.js';
|
|
16
|
+
import { declaredCommand_run } from '../core/commandParse.js';
|
|
17
|
+
import { declarationHelp_derive, subcommandHelp_derive } from '../core/commandUsage.js';
|
|
16
18
|
import { backendInstalled_get } from '../core/backend.js';
|
|
17
19
|
/**
|
|
18
20
|
* Help-text registry keyed by builtin command name, for the commands not yet
|
|
@@ -33,81 +35,6 @@ export const helpText = {
|
|
|
33
35
|
'sudo plugin add pl-dircopy',
|
|
34
36
|
],
|
|
35
37
|
},
|
|
36
|
-
cd: {
|
|
37
|
-
posix: { group: 'Files', differs: 'moves in CFS, including /proc and /net' },
|
|
38
|
-
category: 'Navigation',
|
|
39
|
-
usage: 'cd [path]',
|
|
40
|
-
description: 'Change current working directory',
|
|
41
|
-
examples: [
|
|
42
|
-
'cd /home/user/data # Absolute path',
|
|
43
|
-
'cd experiments # Relative path',
|
|
44
|
-
'cd .. # Parent directory',
|
|
45
|
-
'cd ~ # Home directory',
|
|
46
|
-
'cd # Show current directory',
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
apropos: {
|
|
50
|
-
posix: { group: 'Shell', differs: 'as apropos: searches every command\'s line and description' },
|
|
51
|
-
category: 'General',
|
|
52
|
-
usage: 'apropos <word>',
|
|
53
|
-
summary: 'Find commands by a word in their name, summary or description',
|
|
54
|
-
description: 'Search every command, section and Shell topic for a word, in any case',
|
|
55
|
-
options: ['Nothing found is exit 1, as apropos is. man -k <word> is the same.'],
|
|
56
|
-
examples: ['apropos dicom', 'apropos link', 'man -k pull'],
|
|
57
|
-
},
|
|
58
|
-
man: {
|
|
59
|
-
posix: { group: 'Shell', differs: 'man <name> is help <name>; man -k is apropos' },
|
|
60
|
-
category: 'General',
|
|
61
|
-
usage: 'man <command|Section|topic> | man -k <word>',
|
|
62
|
-
summary: 'The page for a command, a section or a Shell topic (help, by its Unix name)',
|
|
63
|
-
description: 'man <name> is help <name>; man -k <word> is apropos <word>',
|
|
64
|
-
options: [],
|
|
65
|
-
examples: ['man grep', 'man PACS', 'man -k dicom'],
|
|
66
|
-
},
|
|
67
|
-
command: {
|
|
68
|
-
posix: { group: 'Shell', differs: 'as in any POSIX shell: runs the system\'s program, not the builtin' },
|
|
69
|
-
category: 'General',
|
|
70
|
-
usage: 'command <name> [args...]',
|
|
71
|
-
summary: 'Run the system program of a name, not the builtin',
|
|
72
|
-
description: 'Run the system program of a name, skipping the chell builtin of the same name',
|
|
73
|
-
options: [
|
|
74
|
-
'The whole line goes to the host shell as command <name> <args>, reading',
|
|
75
|
-
'whatever was piped in: query … | command grep -i t1 is plain text grep.',
|
|
76
|
-
'command -v <name> answers as the host shell does.',
|
|
77
|
-
],
|
|
78
|
-
examples: ['query PatientID:1234567 | command grep -i t1', 'command -v grep'],
|
|
79
|
-
},
|
|
80
|
-
grep: {
|
|
81
|
-
posix: { group: 'Files', differs: 'also filters numbered listings, keeping their handles (help grep)' },
|
|
82
|
-
category: 'Files',
|
|
83
|
-
usage: 'grep [-ivwEFc] [-e PATTERN]... [PATTERN]',
|
|
84
|
-
summary: 'Keep the lines, or the rows of a numbered listing, that match',
|
|
85
|
-
description: 'Filter text, or a numbered listing keeping its handles',
|
|
86
|
-
options: [
|
|
87
|
-
' -i ignore case -v keep what does not match -w whole words',
|
|
88
|
-
' -E extended regex -F fixed strings -c count only',
|
|
89
|
-
' -e PATTERN a pattern (repeatable: any of them matches)',
|
|
90
|
-
'',
|
|
91
|
-
'Fed a numbered listing (piped in, or the held one when nothing is piped),',
|
|
92
|
-
'grep keeps rows: a matching row stays with the rows above it, a matched',
|
|
93
|
-
'group keeps all of its rows, and every kept row keeps its handle (@SER41',
|
|
94
|
-
'stays @SER41). What it kept becomes the listing @ and ${listing} name.',
|
|
95
|
-
'-c counts and changes nothing.',
|
|
96
|
-
'',
|
|
97
|
-
'A pattern matches a study\'s and a patient\'s own text too. grep -i t1',
|
|
98
|
-
'meant for series descriptions keeps a WHOLE study whose description says',
|
|
99
|
-
't1; grep -i "mri brain" picking whole studies is the same rule.',
|
|
100
|
-
'',
|
|
101
|
-
'Text in, or any other flag or a file operand, is the system grep. To skip',
|
|
102
|
-
'this builtin entirely: command grep …',
|
|
103
|
-
],
|
|
104
|
-
examples: [
|
|
105
|
-
'query PatientID:1234567,Modality:MR | grep -i t1 | grep -vi gadavist',
|
|
106
|
-
'grep -i -e t1 -e mprage',
|
|
107
|
-
'gather list | grep -i sag | gather remove',
|
|
108
|
-
'cat notes.txt | grep -c todo',
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
38
|
url: {
|
|
112
39
|
category: 'Sharing',
|
|
113
40
|
usage: 'url [path]',
|
|
@@ -122,654 +49,12 @@ export const helpText = {
|
|
|
122
49
|
'# The door comes from CHELL_DOOR; without it the fragment alone is printed.',
|
|
123
50
|
],
|
|
124
51
|
},
|
|
125
|
-
pwd: {
|
|
126
|
-
posix: { group: 'Files', differs: 'where the session stands in CFS' },
|
|
127
|
-
category: 'Navigation',
|
|
128
|
-
usage: 'pwd [options]',
|
|
129
|
-
description: 'Print current working directory',
|
|
130
|
-
options: [
|
|
131
|
-
'--title Replace feed_XXXX and pl-<name>_XXXX with titles in path',
|
|
132
|
-
],
|
|
133
|
-
examples: [
|
|
134
|
-
'pwd # Show actual path',
|
|
135
|
-
'pwd --title # Show path with feed/plugin titles',
|
|
136
|
-
'',
|
|
137
|
-
'# Example output:',
|
|
138
|
-
'# pwd',
|
|
139
|
-
'# /home/chris/feeds/feed_2326/pl-dircopy_176660/data',
|
|
140
|
-
'',
|
|
141
|
-
'# pwd --title',
|
|
142
|
-
'# /home/chris/feeds/Brain MRI Analysis/dircopy v2.1.1/data',
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
find: {
|
|
146
|
-
posix: { group: 'Files', differs: 'walks the namespace through the listing cache; links are not followed' },
|
|
147
|
-
category: 'Navigation',
|
|
148
|
-
usage: 'find [path...] [expression]',
|
|
149
|
-
description: 'Walk from each path (. when none) and print the paths the expression selects. Tests and actions join by implicit AND, -o, ! (or -not) and parentheses. Folders are read from the listing cache, so a tree already seen is walked without asking CUBE; /proc/jobs is answered whole from the session\'s job index. A long walk says how far it has got; Ctrl-C stops it and says where.',
|
|
150
|
-
options: [
|
|
151
|
-
'-name PATTERN, -iname PATTERN The entry\'s name matches a shell pattern (-iname ignores case)',
|
|
152
|
-
'-path PATTERN, -ipath PATTERN The printed path matches; * crosses /',
|
|
153
|
-
'-type f|d|l A file, a folder, a link',
|
|
154
|
-
'-newermt DATE Changed after DATE (2026-10-10, or an ISO time)',
|
|
155
|
-
'-status PATTERN A job\'s or feed\'s status (/proc/jobs): finishedWithError, started, ...',
|
|
156
|
-
'-plugin PATTERN The plugin a job ran (/proc/jobs): pl-dircopy, \'pl-dy*\'',
|
|
157
|
-
'-pipeline PATTERN The pipeline whose run made a job (/proc/jobs); \'\' is a direct run',
|
|
158
|
-
'-workflow ID The pipeline run (workflow) that made a job (/proc/jobs)',
|
|
159
|
-
'-maxdepth N, -mindepth N Descend at most N levels; test only from level N',
|
|
160
|
-
'-print, -print0 Print the path (the default), or end it with NUL',
|
|
161
|
-
],
|
|
162
|
-
examples: ["find ~ -name '*.nii'", 'find ~/feeds -maxdepth 2 -type d', "find . -name '*.json' -o -name '*.csv'", 'find /proc/jobs -plugin pl-dircopy -status finishedWithError', "find /proc/jobs -maxdepth 1 -newermt 2026-10-10"],
|
|
163
|
-
},
|
|
164
|
-
cat: {
|
|
165
|
-
posix: { group: 'Files', differs: 'reads CFS files (and a pipe)' },
|
|
166
|
-
category: 'Files',
|
|
167
|
-
usage: CAT_USAGE,
|
|
168
|
-
description: 'Display file contents, with terminal syntax highlighting for recognized text formats',
|
|
169
|
-
options: [
|
|
170
|
-
'--binary Force byte-for-byte binary output',
|
|
171
|
-
'--highlight Force highlighting; infer the language from the filename or content',
|
|
172
|
-
'--highlight=LANGUAGE Force a cli-highlight language such as python, typescript, or sql',
|
|
173
|
-
'--no-highlight Disable automatic syntax highlighting',
|
|
174
|
-
],
|
|
175
|
-
examples: [
|
|
176
|
-
'cat file.txt # Display single file',
|
|
177
|
-
'cat analysis.py # Auto-highlight Python in a terminal',
|
|
178
|
-
'cat source --highlight=python # Force Python highlighting without filename inference',
|
|
179
|
-
'cat config.json --no-highlight # Display raw text',
|
|
180
|
-
'cat file1 file2 # Display multiple files',
|
|
181
|
-
],
|
|
182
|
-
},
|
|
183
|
-
rm: {
|
|
184
|
-
posix: { group: 'Files', differs: 'removes from CFS; -r for folders, -i asks' },
|
|
185
|
-
category: 'Files',
|
|
186
|
-
usage: 'rm [options] <path> [path...]',
|
|
187
|
-
description: 'Remove files or directories',
|
|
188
|
-
options: [
|
|
189
|
-
'-r, -R, --recursive Remove directories recursively (without it a directory is "Is a directory")',
|
|
190
|
-
'-f, --force Force removal',
|
|
191
|
-
'-i, --interactive Prompt before every removal (interactive)',
|
|
192
|
-
'-I Prompt ONCE for the whole list, naming how many',
|
|
193
|
-
'-rf, -fr Recursive and force combined',
|
|
194
|
-
'-ri, -ir Recursive and interactive combined',
|
|
195
|
-
'-- End of options (treat remaining args as filenames)',
|
|
196
|
-
],
|
|
197
|
-
examples: [
|
|
198
|
-
'rm file.txt # Remove single file',
|
|
199
|
-
'rm file1 file2 # Remove multiple files',
|
|
200
|
-
'rm *.json # Remove all .json files (wildcard)',
|
|
201
|
-
'rm -i *.log # Prompt before removing each .log file',
|
|
202
|
-
'rm -r directory/ # Remove directory recursively',
|
|
203
|
-
'rm -rf temp_* # Force remove all temp_* dirs',
|
|
204
|
-
'rm -- --weird-name # Remove file starting with --',
|
|
205
|
-
'rm -- -dash-file # Remove file starting with -',
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
cp: {
|
|
209
|
-
posix: { group: 'Files', differs: 'copies within CFS; -r for folders' },
|
|
210
|
-
category: 'Files',
|
|
211
|
-
usage: 'cp [-t <dir>] [options] <source...> [dest]',
|
|
212
|
-
description: 'Copy files or directories (supports wildcards and multiple sources)',
|
|
213
|
-
options: [
|
|
214
|
-
'(given only a source, the destination is asked for)',
|
|
215
|
-
'-t <dir> Target DIRECTORY; every operand is a source. Given no',
|
|
216
|
-
' value it asks where, and the answer must be a directory.',
|
|
217
|
-
'-r, --recursive Recursive copy (for directories)',
|
|
218
|
-
'',
|
|
219
|
-
'PACS SOURCES: a /net/pacs/queries/... source names query results, not',
|
|
220
|
-
'stored files. cp MATERIALIZES the series: if its DICOMs are not yet in',
|
|
221
|
-
'CUBE it fires a PACS retrieve and waits for them to land (the same',
|
|
222
|
-
'engine as pull), then copies the landed files to the destination.',
|
|
223
|
-
'A series already fully in CUBE is copied without a retrieve.',
|
|
224
|
-
],
|
|
225
|
-
examples: [
|
|
226
|
-
'cp file.txt copy.txt # Copy single file',
|
|
227
|
-
'cp -r dir1/ dir2/ # Copy directory recursively',
|
|
228
|
-
'cp file1 file2 file3 dest/ # Copy multiple files',
|
|
229
|
-
'cp uploads/*.txt backup/ # Copy with wildcard',
|
|
230
|
-
'cp "file with spaces.txt" dest/ # Use quotes for spaces',
|
|
231
|
-
'cp -r /net/pacs/queries/AccessionNumber:123_qid:7/Study_1.2.3_Head/Series_1.2.3.4_AX_T2 results/',
|
|
232
|
-
' # Retrieve-if-needed, then copy the series',
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
|
-
mv: {
|
|
236
|
-
posix: { group: 'Files', differs: 'moves within CFS' },
|
|
237
|
-
category: 'Files',
|
|
238
|
-
usage: 'mv [-t <dir>] <source...> [dest]',
|
|
239
|
-
description: 'Move or rename files or directories (supports wildcards and multiple sources)',
|
|
240
|
-
options: [
|
|
241
|
-
'(given only a source, the destination is asked for)',
|
|
242
|
-
],
|
|
243
|
-
examples: [
|
|
244
|
-
'mv old.txt new.txt # Rename file',
|
|
245
|
-
'mv dir1/ dir2/ # Move directory into dir2',
|
|
246
|
-
'mv file.txt /home/user/archive/ # Move into existing directory',
|
|
247
|
-
'mv file1 file2 file3 dest/ # Move multiple files',
|
|
248
|
-
'mv uploads/* backup/ # Move with wildcard',
|
|
249
|
-
'mv "file with spaces.txt" dest/ # Use quotes for spaces',
|
|
250
|
-
],
|
|
251
|
-
},
|
|
252
|
-
touch: {
|
|
253
|
-
posix: { group: 'Files', differs: 'makes a CFS file; --withContents writes text into it' },
|
|
254
|
-
category: 'Files',
|
|
255
|
-
usage: 'touch [options] <file>',
|
|
256
|
-
description: 'Create empty files or files with content',
|
|
257
|
-
options: [
|
|
258
|
-
'--withContents <string> Create file with inline string content',
|
|
259
|
-
'--withContentsFromFile <file> Create file with content from local host file',
|
|
260
|
-
],
|
|
261
|
-
examples: [
|
|
262
|
-
'touch file.txt # Create empty file',
|
|
263
|
-
'touch --withContents "Hello!" greeting.txt # Create file with string',
|
|
264
|
-
'touch --withContentsFromFile template.json config.json # Create from local file',
|
|
265
|
-
],
|
|
266
|
-
},
|
|
267
|
-
mkdir: {
|
|
268
|
-
posix: { group: 'Files', differs: 'makes CFS folders; -p for parents' },
|
|
269
|
-
category: 'Files',
|
|
270
|
-
usage: 'mkdir [-p] <directory> [directory...]',
|
|
271
|
-
description: 'Create directories',
|
|
272
|
-
options: [
|
|
273
|
-
'-p, --parents make missing parents too, and take a folder already there as done',
|
|
274
|
-
'Without -p, as on Linux: a missing parent is "No such file or directory" and an existing folder is "File exists".',
|
|
275
|
-
],
|
|
276
|
-
examples: [
|
|
277
|
-
'mkdir newdir # Create single directory',
|
|
278
|
-
'mkdir dir1 dir2 # Create multiple directories',
|
|
279
|
-
'mkdir -p experiments/run1 # Create nested directory, parents included',
|
|
280
|
-
'mkdir /proc/tags/urgent # Make a tag (setfattr hangs it on a feed)',
|
|
281
|
-
],
|
|
282
|
-
},
|
|
283
|
-
rmdir: {
|
|
284
|
-
posix: { group: 'Files', differs: 'removes empty CFS folders' },
|
|
285
|
-
category: 'Files',
|
|
286
|
-
usage: 'rmdir <directory> [directory...]',
|
|
287
|
-
summary: 'Remove empty directories',
|
|
288
|
-
description: 'Removes each folder only when it is empty, as on Linux: one that holds anything is '
|
|
289
|
-
+ '"Directory not empty". Under /proc/tags a folder is a tag: rmdir deletes a tag no feed wears.',
|
|
290
|
-
examples: [
|
|
291
|
-
'rmdir scratch # Remove an empty folder',
|
|
292
|
-
'rmdir /proc/tags/old # Delete a tag no feed wears',
|
|
293
|
-
],
|
|
294
|
-
},
|
|
295
52
|
exit: {
|
|
296
53
|
category: 'General',
|
|
297
54
|
usage: 'exit',
|
|
298
55
|
description: 'Exit the shell',
|
|
299
56
|
examples: ['exit'],
|
|
300
57
|
},
|
|
301
|
-
version: {
|
|
302
|
-
category: 'General',
|
|
303
|
-
usage: 'version',
|
|
304
|
-
description: 'Report the versions of the mise stack layers running this session',
|
|
305
|
-
examples: ['version'],
|
|
306
|
-
},
|
|
307
|
-
fortune: {
|
|
308
|
-
category: 'Games',
|
|
309
|
-
usage: 'fortune',
|
|
310
|
-
summary: 'Print a random fortune cookie',
|
|
311
|
-
description: 'Prints a random fortune — the classic UNIX fortune cookie, bundled and self-contained.',
|
|
312
|
-
examples: ['fortune'],
|
|
313
|
-
},
|
|
314
|
-
cowsay: {
|
|
315
|
-
usage: 'cowsay [-W N] [text]',
|
|
316
|
-
summary: 'The ChRIS brain says it — fortune | cowsay',
|
|
317
|
-
description: 'The classic, with the ChRIS brain for a cow: a speech bubble over the mascot. Says what is piped in, else the words given; -W N wraps at N columns (40 by default).',
|
|
318
|
-
options: [' -W N Wrap the bubble at N columns (8 or more)'],
|
|
319
|
-
examples: ['fortune | cowsay', 'cowsay hello, world', 'motd | cowsay -W 60'],
|
|
320
|
-
},
|
|
321
|
-
cowthink: {
|
|
322
|
-
usage: 'cowthink [-W N] [text]',
|
|
323
|
-
summary: 'The ChRIS brain thinks it',
|
|
324
|
-
description: 'cowsay with a thought bubble.',
|
|
325
|
-
examples: ['fortune | cowthink'],
|
|
326
|
-
},
|
|
327
|
-
figlet: {
|
|
328
|
-
usage: 'figlet [text]',
|
|
329
|
-
summary: 'Big letters, solid',
|
|
330
|
-
description: 'Sets words in a five-row face of solid blocks. Letters, digits and the punctuation a title needs; lowercase is set as capitals. Reads what is piped in, else the words given.',
|
|
331
|
-
examples: ['figlet LCARS', 'date +%H:%M | figlet'],
|
|
332
|
-
},
|
|
333
|
-
banner: {
|
|
334
|
-
usage: 'banner [text]',
|
|
335
|
-
summary: 'Big letters in #, as banner drew them',
|
|
336
|
-
description: 'figlet in the face banner used: # for ink.',
|
|
337
|
-
examples: ['banner ChRIS'],
|
|
338
|
-
},
|
|
339
|
-
lolcat: {
|
|
340
|
-
usage: 'lolcat [-p SPREAD] [-S PHASE] [text]',
|
|
341
|
-
summary: 'Text in a rainbow',
|
|
342
|
-
description: 'Paints each character the next hue along a rainbow, drifting down the lines. -p sets how many characters one cycle spans (24), -S where it starts (random). Reads what is piped in, else the words given.',
|
|
343
|
-
options: [' -p SPREAD Characters per rainbow cycle (1 or more)', ' -S PHASE Where the rainbow starts'],
|
|
344
|
-
examples: ['fortune | lolcat', 'figlet ARGUS | lolcat', 'motd | lolcat -p 12'],
|
|
345
|
-
},
|
|
346
|
-
rev: {
|
|
347
|
-
posix: { group: 'Text', differs: 'reads a pipe or its words' },
|
|
348
|
-
usage: 'rev [text]',
|
|
349
|
-
summary: 'Reverse each line',
|
|
350
|
-
description: 'Reverses the characters of each line, keeping the lines in order. Reads what is piped in, else the words given.',
|
|
351
|
-
examples: ['rev stressed', 'fortune | rev'],
|
|
352
|
-
},
|
|
353
|
-
tac: {
|
|
354
|
-
posix: { group: 'Text', differs: 'reads a pipe or its words' },
|
|
355
|
-
usage: 'tac [text]',
|
|
356
|
-
summary: 'Lines last to first',
|
|
357
|
-
description: 'cat backwards: prints the lines in reverse order. Reads what is piped in.',
|
|
358
|
-
examples: ['help games | tac', 'seq 5 | tac'],
|
|
359
|
-
},
|
|
360
|
-
wc: {
|
|
361
|
-
posix: { group: 'Text', differs: 'as wc; a FILE is a ChRIS path' },
|
|
362
|
-
category: 'Files',
|
|
363
|
-
usage: 'wc [-lwcm] [FILE]...',
|
|
364
|
-
summary: 'Count lines, words and bytes',
|
|
365
|
-
description: 'Counts what is piped in, else each file named (- is the pipe), with a total for more than one. With no flag it counts lines, words and bytes; one count of the pipe prints the number alone. It runs in the session, on every surface; another flag goes to the system wc where the surface has one (command wc asks for it).',
|
|
366
|
-
options: [' -l lines -w words -c bytes -m characters'],
|
|
367
|
-
examples: ["find /proc/jobs -plugin pl-dylld | wc -l", 'wc -l notes.txt', 'cat a.csv | wc'],
|
|
368
|
-
},
|
|
369
|
-
head: {
|
|
370
|
-
posix: { group: 'Text', differs: 'as head; a FILE is a ChRIS path' },
|
|
371
|
-
category: 'Files',
|
|
372
|
-
usage: 'head [-n N | -N] [FILE]...',
|
|
373
|
-
summary: 'The first lines',
|
|
374
|
-
description: 'Prints the first ten lines of what is piped in, else of each file named (under ==> name <== for more than one). -n -N prints all but the last N. It runs in the session, on every surface; another flag goes to the system head where the surface has one.',
|
|
375
|
-
options: [' -n N, -N The first N lines -n -N All but the last N'],
|
|
376
|
-
examples: ['ls -l | head -n 5', 'head -3 notes.txt'],
|
|
377
|
-
},
|
|
378
|
-
tail: {
|
|
379
|
-
posix: { group: 'Text', differs: 'as tail, without -f; a FILE is a ChRIS path' },
|
|
380
|
-
category: 'Files',
|
|
381
|
-
usage: 'tail [-n N | -N | -n +N] [FILE]...',
|
|
382
|
-
summary: 'The last lines',
|
|
383
|
-
description: 'Prints the last ten lines of what is piped in, else of each file named. -n +N prints from line N on. It runs in the session, on every surface; another flag (-f among them) goes to the system tail where the surface has one.',
|
|
384
|
-
options: [' -n N, -N The last N lines -n +N From line N to the end'],
|
|
385
|
-
examples: ['cat /proc/jobs/feed_12/pl-dircopy_40/log | tail -n 20', 'tail -n +2 a.csv'],
|
|
386
|
-
},
|
|
387
|
-
sort: {
|
|
388
|
-
posix: { group: 'Text', differs: 'as sort, a key by whole fields; a FILE is a ChRIS path' },
|
|
389
|
-
category: 'Files',
|
|
390
|
-
usage: 'sort [-rnfu] [-k N[,M]] [-t C] [FILE]...',
|
|
391
|
-
summary: 'Lines in order',
|
|
392
|
-
description: 'Sorts the lines of what is piped in, else of the files named, stably. -k compares fields N to M (to the end without M), split at -t C or at runs of blanks. It runs in the session, on every surface; another flag or a key with its own options (-k2n) goes to the system sort where the surface has one.',
|
|
393
|
-
options: [
|
|
394
|
-
' -r reverse -n by number -f ignore case -u one of each equal line',
|
|
395
|
-
' -k N[,M] compare fields N to M -t C fields split at C',
|
|
396
|
-
],
|
|
397
|
-
examples: ['find /proc/jobs -status finishedWithError | sort', 'cat a.csv | sort -t , -k 2 -n'],
|
|
398
|
-
},
|
|
399
|
-
uniq: {
|
|
400
|
-
posix: { group: 'Text', differs: 'as uniq, without an output file; a FILE is a ChRIS path' },
|
|
401
|
-
category: 'Files',
|
|
402
|
-
usage: 'uniq [-cdui] [FILE]',
|
|
403
|
-
summary: 'Fold adjacent equal lines to one',
|
|
404
|
-
description: 'Folds each run of equal adjacent lines to one, of what is piped in or of one file. Sort first to fold every equal line. It runs in the session, on every surface; another flag goes to the system uniq where the surface has one.',
|
|
405
|
-
options: [' -c prefix each with its count -d only repeated lines -u only lines never repeated -i ignore case'],
|
|
406
|
-
examples: ['cut -d , -f 1 a.csv | sort | uniq -c', 'ls | uniq'],
|
|
407
|
-
},
|
|
408
|
-
cut: {
|
|
409
|
-
posix: { group: 'Text', differs: 'as cut, -b as -c; a FILE is a ChRIS path' },
|
|
410
|
-
category: 'Files',
|
|
411
|
-
usage: 'cut -f LIST [-d C] [-s] | -c LIST [FILE]...',
|
|
412
|
-
summary: 'Keep fields or characters of each line',
|
|
413
|
-
description: 'Keeps the fields (split at -d C, a tab when not said) or the characters LIST names, of each line piped in or of the files named. A LIST is N, N-M, N- or -M, joined by commas. -s drops a line with no delimiter. It runs in the session, on every surface; another flag goes to the system cut where the surface has one.',
|
|
414
|
-
options: [' -f LIST fields -c LIST characters -d C the field delimiter -s only lines that hold it'],
|
|
415
|
-
examples: ['cut -d , -f 1,3 a.csv', 'ls | cut -c 1-8'],
|
|
416
|
-
},
|
|
417
|
-
yes: {
|
|
418
|
-
posix: { group: 'Text', differs: 'bounded: ten lines unless told how many, never forever' },
|
|
419
|
-
usage: 'yes [word] [-n N]',
|
|
420
|
-
summary: 'Repeat a word (ten times, not forever)',
|
|
421
|
-
description: 'Prints a word on its own line, over and over — but bounded: ten times unless -n N asks for more (up to 10000), and it says how many it printed. The real yes runs until killed; a session is not the place.',
|
|
422
|
-
options: [' -n N Lines to print (default 10, at most 10000)'],
|
|
423
|
-
examples: ['yes', 'yes no -n 3', 'yes | head -n 2'],
|
|
424
|
-
},
|
|
425
|
-
seq: {
|
|
426
|
-
posix: { group: 'Text', differs: 'as seq' },
|
|
427
|
-
usage: 'seq [FIRST [STEP]] LAST',
|
|
428
|
-
summary: 'Count from one number to another',
|
|
429
|
-
description: 'Prints the numbers from FIRST to LAST by STEP, one per line, as seq does: seq 5 is 1 to 5, seq 2 10 is 2 to 10, seq 10 -2 0 counts down. At most 100000 numbers.',
|
|
430
|
-
examples: ['seq 5', 'seq 0 5 30', 'seq 10 -1 1 | tac'],
|
|
431
|
-
},
|
|
432
|
-
factor: {
|
|
433
|
-
posix: { group: 'System', differs: 'as factor' },
|
|
434
|
-
usage: 'factor N [N...]',
|
|
435
|
-
summary: 'Prime factors of a number',
|
|
436
|
-
description: 'Prints each number with its prime factors, smallest first, repeats included, as factor does.',
|
|
437
|
-
examples: ['factor 360', 'factor 2026 1729'],
|
|
438
|
-
},
|
|
439
|
-
primes: {
|
|
440
|
-
posix: { group: 'System', differs: 'as primes' },
|
|
441
|
-
usage: 'primes [FROM] TO',
|
|
442
|
-
summary: 'The primes up to a number',
|
|
443
|
-
description: 'Lists the primes from FROM (2 when omitted) to TO, at most 10000 of them.',
|
|
444
|
-
examples: ['primes 100', 'primes 1000 1100'],
|
|
445
|
-
},
|
|
446
|
-
shuf: {
|
|
447
|
-
posix: { group: 'Text', differs: 'reads a pipe or its words' },
|
|
448
|
-
usage: 'shuf [words...]',
|
|
449
|
-
summary: 'Shuffle lines',
|
|
450
|
-
description: 'Prints the lines piped in, or the words given, in a random order.',
|
|
451
|
-
examples: ['shuf a b c d', 'ls | shuf', 'seq 10 | shuf'],
|
|
452
|
-
},
|
|
453
|
-
roll: {
|
|
454
|
-
usage: 'roll [NdS[+M]...]',
|
|
455
|
-
summary: 'Roll dice: roll 2d6+1, roll d20',
|
|
456
|
-
description: 'Rolls dice written the tabletop way: N dice of S sides, plus or minus a modifier. Bare roll is one six-sided die. Shows each face and the total.',
|
|
457
|
-
examples: ['roll', 'roll 2d6', 'roll d20 3d8+2'],
|
|
458
|
-
},
|
|
459
|
-
rot13: {
|
|
460
|
-
usage: 'rot13 [text]',
|
|
461
|
-
summary: 'Turn letters half the alphabet round',
|
|
462
|
-
description: 'ROT13: each letter moved thirteen places, so applying it twice gives the text back. Reads what is piped in, else the words given.',
|
|
463
|
-
examples: ['rot13 hello', 'fortune | rot13 | rot13'],
|
|
464
|
-
},
|
|
465
|
-
morse: {
|
|
466
|
-
usage: 'morse [-d] [text]',
|
|
467
|
-
summary: 'Text to Morse code and back',
|
|
468
|
-
description: 'Taps text out in International Morse — one space between letters, a slash between words — or, with -d, reads code back into text. Reads what is piped in, else the words given.',
|
|
469
|
-
options: [' -d, --decode Read code into text'],
|
|
470
|
-
examples: ['morse sos', 'morse -d ... --- ...', 'fortune | morse'],
|
|
471
|
-
},
|
|
472
|
-
calc: {
|
|
473
|
-
usage: 'calc <expression>',
|
|
474
|
-
summary: 'Arithmetic: calc 2^10, calc sqrt(2)*pi',
|
|
475
|
-
description: 'Evaluates an arithmetic expression: + - * / % ^, parentheses, sqrt, abs, ln, log, log2, exp, sin, cos, tan, asin, acos, atan, floor, ceil, round, and the constants pi, e and tau. No shell is involved.',
|
|
476
|
-
examples: ['calc 2^10', 'calc (3+4)*5', 'calc sqrt(2)*pi', 'calc 1024*1024'],
|
|
477
|
-
},
|
|
478
|
-
units: {
|
|
479
|
-
posix: { group: 'System', differs: 'a small set of conversions' },
|
|
480
|
-
usage: 'units VALUE FROM [to] TO | units list',
|
|
481
|
-
summary: 'Convert between units: units 10 mm in',
|
|
482
|
-
description: 'Converts a quantity between two units of one kind: length (mm cm m km in ft yd mi), mass (g kg mg lb oz), time (ms s min h d wk yr), data (B kB MB GB TB KiB MiB GiB TiB bit) and temperature (C F K). units list names them all.',
|
|
483
|
-
examples: ['units 10 mm in', 'units 72 F to C', 'units 1 GiB MB', 'units list'],
|
|
484
|
-
},
|
|
485
|
-
who: {
|
|
486
|
-
posix: { group: 'System', differs: 'the surfaces on this session (each terminal and browser), not logged-in users' },
|
|
487
|
-
usage: 'who',
|
|
488
|
-
summary: 'Who is attached to this session',
|
|
489
|
-
description: 'Lists the surfaces on this session — each terminal and browser, by the host\'s name for it — marking the one you are at. A local shell answers for itself alone.',
|
|
490
|
-
examples: ['who'],
|
|
491
|
-
},
|
|
492
|
-
uptime: {
|
|
493
|
-
posix: { group: 'System', differs: 'how long this session\'s process has run, not this machine' },
|
|
494
|
-
usage: 'uptime',
|
|
495
|
-
summary: 'How long this session\'s process has been up',
|
|
496
|
-
description: 'The time, how long the process serving this session has run, how many surfaces are attached, since when, and its pid.',
|
|
497
|
-
examples: ['uptime'],
|
|
498
|
-
},
|
|
499
|
-
say: {
|
|
500
|
-
usage: 'say [text]',
|
|
501
|
-
summary: 'A surface with a voice speaks it',
|
|
502
|
-
description: 'Hands words to the surface: a browser speaks them (ARGUS, through the page\'s speech), a terminal prints them. Reads what is piped in, else the words given.',
|
|
503
|
-
examples: ['say analysis complete', 'fortune | say'],
|
|
504
|
-
},
|
|
505
|
-
wtf: {
|
|
506
|
-
usage: 'wtf [is] <term>... | wtf -l',
|
|
507
|
-
summary: 'What an acronym means: wtf is lonk',
|
|
508
|
-
description: 'BSD\'s acronym expander with the lab\'s own book: ChRIS, CUBE, pfdcm, oxidicom, LONK, PACS, DICOM, MRN, SeaGaP, the mise packages and more. A term the book lacks is said so; -l lists every term it has.',
|
|
509
|
-
options: [' -l, --list Every term in the book'],
|
|
510
|
-
examples: ['wtf is lonk', 'wtf cube pfdcm', 'wtf -l'],
|
|
511
|
-
},
|
|
512
|
-
qr: {
|
|
513
|
-
usage: 'qr <text or URL>',
|
|
514
|
-
summary: 'A QR code in the console, for a phone',
|
|
515
|
-
description: 'Draws a QR code of the text — a URL, mostly — in half-block characters, light modules bright so a phone camera reads it off a dark screen. Up to 271 bytes (QR versions 1 to 10, error correction L), encoded here with no library.',
|
|
516
|
-
examples: ['qr https://titan.tch.harvard.edu', 'whereami | qr'],
|
|
517
|
-
},
|
|
518
|
-
pom: {
|
|
519
|
-
usage: 'pom [date]',
|
|
520
|
-
summary: 'The phase of the moon',
|
|
521
|
-
description: 'BSD\'s pom: the Moon\'s phase today (or on a date), how much of it is lit, the days to the next full and new moons, and a small moon drawn as it looks.',
|
|
522
|
-
examples: ['pom', 'pom 2026-12-25'],
|
|
523
|
-
},
|
|
524
|
-
stardate: {
|
|
525
|
-
usage: 'stardate [date]',
|
|
526
|
-
summary: 'The stardate, two ways',
|
|
527
|
-
description: 'The day as a stardate: by the Kelvin films\' reckoning (the year, then the day of it), with TNG\'s thousand-a-year count from 2323 beside it.',
|
|
528
|
-
examples: ['stardate', 'stardate 2366-01-01'],
|
|
529
|
-
},
|
|
530
|
-
ddate: {
|
|
531
|
-
usage: 'ddate [date]',
|
|
532
|
-
summary: 'The Discordian date',
|
|
533
|
-
description: 'Today in the Discordian calendar: five seasons of 73 days, a five-day week, St. Tib\'s Day in a leap year, and the holy days called out. Hail Eris.',
|
|
534
|
-
examples: ['ddate', 'ddate 2028-02-29'],
|
|
535
|
-
},
|
|
536
|
-
sunrise: {
|
|
537
|
-
usage: 'sunrise [place]',
|
|
538
|
-
summary: 'When the sun rises and sets at a place',
|
|
539
|
-
description: 'Asks Open-Meteo (the service weather uses; no key) for sunrise, sunset and the length of the day at a place, today and tomorrow, in the place\'s own time. Boston when no place is named. Needs the session host to reach the internet.',
|
|
540
|
-
examples: ['sunrise', 'sunrise Cape Town', 'sunrise Tromsø'],
|
|
541
|
-
},
|
|
542
|
-
play: {
|
|
543
|
-
category: 'Workflows',
|
|
544
|
-
usage: 'play <manifest> [--param NAME=value]... [--pace <duration>] [--dry-run] [--status]',
|
|
545
|
-
summary: 'Run a manifest: the lines an operator could have typed',
|
|
546
|
-
description: 'Plays a manifest (a script is one): its lines run in order in a scope of their own, each shown as it runs, and the first refused line stops it, non-zero. When it ends, however it ends, the session is back in the directory the play began in, so a manifest that cds into a feed does not leave every surface there. The manifest is read from the session\'s filesystem first and from the engine\'s disk second. --status runs nothing: each line is expanded as a dry run expands it and its verb says, from what the backend keeps and never from the cloud, where it stands (not yet, with what is missing; ready; done; changed, with what changed), one row per line and a count at the end; a verb that keeps nothing reads as a dash. See docs/manifest.adoc.',
|
|
547
|
-
options: [
|
|
548
|
-
'OPTIONS:',
|
|
549
|
-
' --param NAME=value Supply a parameter the manifest declares (repeatable)',
|
|
550
|
-
' --pace <duration> Wait between lines, for watching a play at a surface',
|
|
551
|
-
' --dry-run Expand the lines and show them without running any',
|
|
552
|
-
'',
|
|
553
|
-
'A MANIFEST:',
|
|
554
|
-
' # a comment',
|
|
555
|
-
' @name what this workflow is',
|
|
556
|
-
' @description one line about it',
|
|
557
|
-
' @param NAME a parameter it needs',
|
|
558
|
-
' @param LABEL = draft one with a default',
|
|
559
|
-
' @answers C the variable X=$(play f) holds',
|
|
560
|
-
' <any kernel line> C=$(…) names what a line made',
|
|
561
|
-
'',
|
|
562
|
-
'VARIABLES a line may use (${C.field}, ${cwd} …): see help variables',
|
|
563
|
-
],
|
|
564
|
-
examples: [
|
|
565
|
-
'play ~/flows/battery.mise',
|
|
566
|
-
'play ~/flows/battery.mise --dry-run',
|
|
567
|
-
'play ~/flows/battery.mise --pace 2s',
|
|
568
|
-
],
|
|
569
|
-
},
|
|
570
|
-
expect: {
|
|
571
|
-
category: 'Workflows',
|
|
572
|
-
usage: 'expect <subject> [<target>] <property> [<predicate> <value>] [--within <duration>]',
|
|
573
|
-
summary: 'State a claim about the session, and refuse when it does not hold',
|
|
574
|
-
description: 'A claim the session checks: it holds, or the line fails, non-zero, saying what it wanted and what it got. The core answers path; the session\'s backend adds the subjects of its own world, and expect with no words names every subject this session has, with their properties.',
|
|
575
|
-
options: [
|
|
576
|
-
'SUBJECTS (the core\'s; the backend adds its own):',
|
|
577
|
-
' path <p> exists Whether a path is there',
|
|
578
|
-
' path <p> count [--matching <glob>] How many things a folder holds',
|
|
579
|
-
'',
|
|
580
|
-
'COMPARISONS:',
|
|
581
|
-
' eq ne gt gte lt lte contains notContains matches',
|
|
582
|
-
'',
|
|
583
|
-
'OPTIONS:',
|
|
584
|
-
' --within <duration> Keep asking until the claim holds or the time is up (30s, 20m, 2h)',
|
|
585
|
-
' --matching <glob> Narrow a count to names matching a shell pattern',
|
|
586
|
-
' --deep Count beneath the folder too',
|
|
587
|
-
],
|
|
588
|
-
examples: [
|
|
589
|
-
'expect path ~/results exists',
|
|
590
|
-
'expect path ~/results count --matching "*.nii*" --deep gt 0',
|
|
591
|
-
],
|
|
592
|
-
},
|
|
593
|
-
set: {
|
|
594
|
-
posix: { group: 'System', differs: 'lists and shows variables only: no options, no positional parameters; a variable holds a command\'s typed answer' },
|
|
595
|
-
category: 'General',
|
|
596
|
-
usage: 'set [NAME]',
|
|
597
|
-
summary: 'List the variables, or show one',
|
|
598
|
-
description: 'Bare, lists every variable in scope: its name, the kind of answer it holds, and what it expands to; a manifest\'s parameters are marked read-only. With a name, shows that variable\'s answer whole (JSON for a model) and answers with it, so it can be captured again. A variable is set by a line of its own: NAME=$(command) holds what the command answered (its model, or the text it printed when it has none), NAME=word holds one word. ${NAME} expands to its rows; ${NAME.field} to a field of its model. See help variables.',
|
|
599
|
-
examples: ['set', 'set A', 'A=$(ls ~/uploads)', 'LABEL=\'sag cohort\''],
|
|
600
|
-
},
|
|
601
|
-
unset: {
|
|
602
|
-
posix: { group: 'System', differs: 'removes session variables; a manifest\'s parameters and the session\'s built-ins refuse' },
|
|
603
|
-
category: 'General',
|
|
604
|
-
usage: 'unset NAME…',
|
|
605
|
-
summary: 'Remove variables',
|
|
606
|
-
description: 'Removes each named variable from the scope the line runs in. Quiet when it removes, as unset is. A manifest\'s parameter and the session\'s own names (cwd, listing, gather) are read-only and refuse by name.',
|
|
607
|
-
examples: ['unset A', 'unset A B'],
|
|
608
|
-
},
|
|
609
|
-
echo: {
|
|
610
|
-
posix: { group: 'Text', differs: 'no options and no escapes: the words, joined by a space, on one line; printf writes anything else' },
|
|
611
|
-
category: 'General',
|
|
612
|
-
usage: 'echo [WORD]…',
|
|
613
|
-
summary: 'Write words on a line',
|
|
614
|
-
description: 'Writes its words joined by a space and ends the line. It takes no option and reads no escape, since the System V and BSD echos disagree on both; -n, -e or -E as the first word is refused by name rather than obeyed; later it is a word. A field of a variable is a word like any other: echo ${R.feedId}. It answers with text, so A=$(echo …) holds what it wrote. To see a variable whole, set NAME.',
|
|
615
|
-
examples: ['echo hello', 'echo feed ${R.feedId}', 'X=$(echo t1 cohort)'],
|
|
616
|
-
},
|
|
617
|
-
printf: {
|
|
618
|
-
posix: { group: 'Text', differs: 'POSIX\'s subset: %s, %d, %i, %%, flags, width and precision; the escapes \\n, \\t and \\\\; always ends the line' },
|
|
619
|
-
category: 'General',
|
|
620
|
-
usage: 'printf FORMAT [ARG]…',
|
|
621
|
-
summary: 'Write arguments under a format',
|
|
622
|
-
description: 'Writes each argument under the format, as POSIX printf does: %s a word, %d and %i a whole number, %% a percent sign, each with the flags - 0 + and space, a width and a precision (%-12s, %05d, %.3s). With more arguments than the format takes, the format is written again until they run out; one missing is empty for %s and 0 for %d. The escapes are \\n, \\t and \\\\; a backslash in quotes reaches printf as written, so \'%s\\n\' or "%s\\n" writes a newline. Any other conversion or escape is refused by name. A session writes whole lines, so the text always ends its line. It answers with text, so A=$(printf …) holds what it wrote.',
|
|
623
|
-
examples: ['printf "feed %s: %s" ${R.feedId} done', "printf '%-8s %5d\\n' a 1 bb 22", 'NAME=$(printf "%s-%03d" scan 7)'],
|
|
624
|
-
},
|
|
625
|
-
kill: {
|
|
626
|
-
posix: { group: 'System', differs: 'stops a session task (/proc/<source>/<id>), never a process; asks, never forces' },
|
|
627
|
-
category: 'General',
|
|
628
|
-
usage: 'kill <task>…',
|
|
629
|
-
summary: 'Ask a running task to stop',
|
|
630
|
-
description: 'Asks each task to stop: /proc/<source>/<id>, <source>/<id>, a joblet\'s %N, or its name alone when one source has it. Quiet when it is asked, as kill is. The task ends when its current operation does: a cloud job cut short can leave its state locked, so a task is never forced, there is no -9, and a second kill says so instead.',
|
|
631
|
-
examples: ['kill /proc/steps/trial-build', 'kill trial-build', 'kill %1'],
|
|
632
|
-
},
|
|
633
|
-
wait: {
|
|
634
|
-
posix: { group: 'System', differs: 'waits on session tasks, following each one\'s log' },
|
|
635
|
-
category: 'General',
|
|
636
|
-
usage: 'wait [<task>…]',
|
|
637
|
-
summary: 'Follow a task until it ends',
|
|
638
|
-
description: 'Follows each task\'s log until it ends, then says how it ended; bare, every running task. The status is the tasks\': 0 when all ended done. Ctrl-C stops following and leaves the task running; wait again picks it up.',
|
|
639
|
-
examples: ['wait trial-build', 'wait %1', 'wait'],
|
|
640
|
-
},
|
|
641
|
-
joblets: {
|
|
642
|
-
posix: { group: 'Shell', differs: 'is jobs: the word jobs lists CUBE plugin instances' },
|
|
643
|
-
category: 'General',
|
|
644
|
-
usage: 'joblets',
|
|
645
|
-
summary: 'List the lines run in the background',
|
|
646
|
-
description: 'Lists every joblet the session keeps, by number: a line ended with & runs as one, at /proc/joblets/<N>, its output in /proc/joblets/<N>/log. Each reads Running, Waiting for an answer, Done, Failed (with its exit status), Stopped, or Ended by restart. A joblet stands where its line was typed and starts with its variables; its own cd and assignments stay inside it. fg %N follows one, kill %N stops one.',
|
|
647
|
-
examples: ['pull pacs PatientID:1234 &', 'joblets', 'fg %1', 'kill %1', 'cat /proc/joblets/1/log'],
|
|
648
|
-
},
|
|
649
|
-
fg: {
|
|
650
|
-
posix: { group: 'Shell', differs: 'follows a joblet\'s log; Ctrl-C stops following, not the joblet' },
|
|
651
|
-
category: 'General',
|
|
652
|
-
usage: 'fg [%N]',
|
|
653
|
-
summary: 'Bring a joblet to the front',
|
|
654
|
-
description: 'Asks the question the joblet waits on here, then follows its log until it ends; bare, the most recent joblet. Any surface of the session may bring any joblet forward. The status is the joblet\'s: 0 when it ended done. Ctrl-C stops following and leaves it running; kill %N stops it.',
|
|
655
|
-
examples: ['fg', 'fg %2'],
|
|
656
|
-
},
|
|
657
|
-
timer: {
|
|
658
|
-
usage: 'timer <duration> [words] | timer | timer cancel [id|all]',
|
|
659
|
-
summary: 'A chime after a while: timer 5m tea',
|
|
660
|
-
description: 'Sets a chime for later — 90s, 5m, 1h30m, 2:30, or a bare number of minutes — with the words to say when it sounds. The chime reaches every surface on the session: ARGUS notes it in the console and speaks it, a remote chell prints it. Nothing waits: the console is yours meanwhile. Bare timer lists the chimes waiting; timer cancel ends them. A chime lives as long as the session\'s process.',
|
|
661
|
-
examples: ['timer 5m tea', 'timer 25m pomodoro over', 'timer 1:30', 'timer', 'timer cancel 2'],
|
|
662
|
-
},
|
|
663
|
-
leave: {
|
|
664
|
-
usage: 'leave [+hhmm | hhmm] | leave cancel',
|
|
665
|
-
summary: 'A word when it is time to go home: leave +0030',
|
|
666
|
-
description: 'BSD\'s leave: tell it when you must leave — +hhmm from now, or a clock time — and it says so five minutes before, at the time, and a minute after. Bare leave says when; leave cancel forgets it.',
|
|
667
|
-
examples: ['leave +0030', 'leave 1730', 'leave', 'leave cancel'],
|
|
668
|
-
},
|
|
669
|
-
stopwatch: {
|
|
670
|
-
usage: 'stopwatch [start|stop|lap|reset]',
|
|
671
|
-
summary: 'A stopwatch, with laps',
|
|
672
|
-
description: 'One stopwatch per session: start, stop (and start again to resume), lap, reset. Bare stopwatch shows the time and the laps.',
|
|
673
|
-
examples: ['stopwatch start', 'stopwatch lap', 'stopwatch', 'stopwatch stop'],
|
|
674
|
-
},
|
|
675
|
-
sl: {
|
|
676
|
-
usage: 'sl [--pane]',
|
|
677
|
-
summary: 'A starship crosses the screen (the punishment for mistyping ls)',
|
|
678
|
-
description: 'The train of old, refitted: a starship glides across the terminal. q, Esc or Ctrl-C gives the screen back. --pane draws it in ARGUS\'s GAMES pane instead (the transcript console always does).',
|
|
679
|
-
examples: ['sl', 'sl --pane'],
|
|
680
|
-
},
|
|
681
|
-
cmatrix: {
|
|
682
|
-
usage: 'cmatrix [--pane]',
|
|
683
|
-
summary: 'The glyph rain',
|
|
684
|
-
description: 'Columns of glyphs falling down the terminal. q, Esc or Ctrl-C gives the screen back. --pane draws it in ARGUS\'s GAMES pane instead (the transcript console always does).',
|
|
685
|
-
examples: ['cmatrix', 'cmatrix --pane'],
|
|
686
|
-
},
|
|
687
|
-
rain: {
|
|
688
|
-
usage: 'rain [--pane]',
|
|
689
|
-
summary: 'Rain',
|
|
690
|
-
description: 'Drops falling and ringing out on the floor of the terminal. q, Esc or Ctrl-C gives the screen back. --pane draws it in ARGUS\'s GAMES pane instead (the transcript console always does).',
|
|
691
|
-
examples: ['rain'],
|
|
692
|
-
},
|
|
693
|
-
asciiquarium: {
|
|
694
|
-
usage: 'asciiquarium [--pane]',
|
|
695
|
-
summary: 'An aquarium: fish, weed, bubbles',
|
|
696
|
-
description: 'Fish swimming both ways, weed swaying, bubbles rising, in the terminal. q, Esc or Ctrl-C gives the screen back. --pane draws it in ARGUS\'s GAMES pane instead (the transcript console always does).',
|
|
697
|
-
examples: ['asciiquarium'],
|
|
698
|
-
},
|
|
699
|
-
tetris: {
|
|
700
|
-
usage: 'tetris [--pane]',
|
|
701
|
-
summary: 'Falling blocks',
|
|
702
|
-
description: 'Played in the terminal: left/right move, up rotates, down drops. q, Esc or Ctrl-C gives the screen back. --pane draws it in ARGUS\'s GAMES pane instead (the transcript console always does).',
|
|
703
|
-
examples: ['tetris', 'tetris --pane'],
|
|
704
|
-
},
|
|
705
|
-
snake: {
|
|
706
|
-
usage: 'snake [--pane]',
|
|
707
|
-
summary: 'The snake',
|
|
708
|
-
description: 'Played in the terminal: arrows (or hjkl, wasd) steer; eat the food, do not eat yourself. q, Esc or Ctrl-C gives the screen back. --pane draws it in ARGUS\'s GAMES pane instead (the transcript console always does).',
|
|
709
|
-
examples: ['snake'],
|
|
710
|
-
},
|
|
711
|
-
quiz: {
|
|
712
|
-
usage: 'quiz',
|
|
713
|
-
summary: 'Five questions about the lab and its words',
|
|
714
|
-
description: 'Asks five questions from the lab\'s own book — CUBE, DICOM, plugins, the services — one at a time; answer, or q to stop. Plays anywhere a question can be answered: a terminal or the ARGUS console.',
|
|
715
|
-
examples: ['quiz'],
|
|
716
|
-
},
|
|
717
|
-
hangman: {
|
|
718
|
-
usage: 'hangman',
|
|
719
|
-
summary: 'Hangman, with the lab\'s words',
|
|
720
|
-
description: 'A word from the lab, six misses allowed: a letter a turn, the whole word when you know it, q to give up.',
|
|
721
|
-
examples: ['hangman'],
|
|
722
|
-
},
|
|
723
|
-
trek: {
|
|
724
|
-
usage: 'trek [--classic] [-f | -s] [--seed N] [--credits]',
|
|
725
|
-
summary: 'The 1976 Berkeley space war game (BSD trek)',
|
|
726
|
-
description: 'Command a starship against an invading fleet across an 8×8 galaxy of quadrants, by question: srscan, lrscan, move, phasers, torpedo, shield, dock, computer and the rest (? at any prompt lists the answers it takes). Answers can be typed ahead on one line, as in the original. The scans wear glyphs and colours; --classic shows them as printed in 1976. -f and -s are the original fast and slow modes; --seed N replays a galaxy; --credits (or credits in the game) names who made it. terminate ends a game; answer no to Another game to leave.',
|
|
727
|
-
examples: ['trek', 'trek --classic', 'trek --seed 42', 'trek --credits'],
|
|
728
|
-
},
|
|
729
|
-
'2048': {
|
|
730
|
-
usage: '2048',
|
|
731
|
-
summary: 'Slide the tiles, join the powers of two',
|
|
732
|
-
description: 'The 4×4 board, a move per answer: w a s d (or h j k l) slide, q stops. Two tiles alike join; reach 2048.',
|
|
733
|
-
examples: ['2048'],
|
|
734
|
-
},
|
|
735
|
-
notes: {
|
|
736
|
-
category: 'General',
|
|
737
|
-
usage: 'notes [--since N|YYYY-MM-DD] [--all] [--long]',
|
|
738
|
-
summary: 'What the installed releases changed, for the operator',
|
|
739
|
-
description: 'Reads the release notes shipped with the packages installed where this session runs — argus, brasa, chell, calypso, porter — and lists the newest release: one row per change, the package tagged. --since N shows the last N releases, --since DATE everything from a day on; --long unfolds each change beneath its first sentence; --all includes the changes marked Internal. help notes is the same. In ARGUS the WHAT\'S NEW block opens them as a listing.',
|
|
740
|
-
examples: ['notes', 'notes --since 3', 'notes --since 2026-10-01 --long', 'notes --all'],
|
|
741
|
-
},
|
|
742
|
-
weather: {
|
|
743
|
-
category: 'Games',
|
|
744
|
-
usage: 'weather [place] [-u|--units metric|imperial] [-d|--days N]',
|
|
745
|
-
summary: 'The weather at a place, now and the next few days',
|
|
746
|
-
description: 'Reports the current conditions and a short forecast for a place, from Open-Meteo (no key, no account). The place is found by name; with none given it is Boston. Metric (°C, km/h) unless --units imperial asks for °F and mph. The call is made from the session host, so it needs that host to reach the internet.',
|
|
747
|
-
options: [
|
|
748
|
-
' -u, --units SYS metric (default: °C, km/h) or imperial (°F, mph)',
|
|
749
|
-
' -d, --days N Days of forecast to show (default 3, at most 16)',
|
|
750
|
-
],
|
|
751
|
-
examples: ['weather', 'weather Cape Town', 'weather Boston --units imperial', 'weather Paris -d 7'],
|
|
752
|
-
},
|
|
753
|
-
date: {
|
|
754
|
-
posix: { group: 'System', differs: 'as date, with its + formats' },
|
|
755
|
-
category: 'General',
|
|
756
|
-
usage: 'date [-u] [+FORMAT]',
|
|
757
|
-
summary: 'Print the current date and time',
|
|
758
|
-
description: 'Prints the current date and time, in the spirit of UNIX date. Use -u for UTC and +FORMAT for a strftime-style format string. Reports the time only; it never sets the clock.',
|
|
759
|
-
options: [
|
|
760
|
-
' -u, --utc Print (or interpret) time in UTC',
|
|
761
|
-
' +FORMAT strftime-style format (e.g. +%Y-%m-%d, +%H:%M:%S)',
|
|
762
|
-
],
|
|
763
|
-
examples: ['date', 'date -u', 'date +%Y-%m-%d', 'date "+%A, %B %e %Y"'],
|
|
764
|
-
},
|
|
765
|
-
cal: {
|
|
766
|
-
posix: { group: 'System', differs: 'as cal' },
|
|
767
|
-
category: 'Games',
|
|
768
|
-
usage: 'cal [[month] year]',
|
|
769
|
-
summary: 'Print a calendar',
|
|
770
|
-
description: 'Prints a month or year calendar with today highlighted, in the spirit of UNIX cal.',
|
|
771
|
-
examples: ['cal', 'cal 2026', 'cal 7 2026'],
|
|
772
|
-
},
|
|
773
58
|
clear: {
|
|
774
59
|
category: 'Settings',
|
|
775
60
|
usage: 'clear',
|
|
@@ -791,45 +76,6 @@ export const helpText = {
|
|
|
791
76
|
'prompt p10k # Switch to two-line Powerlevel10k-inspired theme',
|
|
792
77
|
],
|
|
793
78
|
},
|
|
794
|
-
timing: {
|
|
795
|
-
category: 'Settings',
|
|
796
|
-
usage: 'timing [on|off]',
|
|
797
|
-
description: 'Toggle or display command timing mode',
|
|
798
|
-
options: [
|
|
799
|
-
'on Enable timing display',
|
|
800
|
-
'off Disable timing display',
|
|
801
|
-
],
|
|
802
|
-
examples: [
|
|
803
|
-
'timing # Show current status',
|
|
804
|
-
'timing on # Enable timing display',
|
|
805
|
-
'timing off # Disable timing display',
|
|
806
|
-
],
|
|
807
|
-
},
|
|
808
|
-
debug: {
|
|
809
|
-
category: 'Settings',
|
|
810
|
-
usage: 'debug [on|off]',
|
|
811
|
-
description: 'Toggle or display debug mode (verbose logging)',
|
|
812
|
-
options: [
|
|
813
|
-
'on Enable debug logging',
|
|
814
|
-
'off Disable debug logging',
|
|
815
|
-
],
|
|
816
|
-
examples: [
|
|
817
|
-
'debug # Show current status',
|
|
818
|
-
'debug on # Enable debug mode',
|
|
819
|
-
'debug off # Disable debug mode',
|
|
820
|
-
],
|
|
821
|
-
},
|
|
822
|
-
help: {
|
|
823
|
-
category: 'General',
|
|
824
|
-
usage: 'help [command]',
|
|
825
|
-
description: 'Display help information',
|
|
826
|
-
examples: [
|
|
827
|
-
'help # List all commands',
|
|
828
|
-
'help games # The /usr/games shelf, by category',
|
|
829
|
-
'help ls # Show help for ls',
|
|
830
|
-
'help timing # Show help for timing',
|
|
831
|
-
],
|
|
832
|
-
},
|
|
833
79
|
'!': {
|
|
834
80
|
category: 'General',
|
|
835
81
|
usage: '! <shell_command>',
|
|
@@ -971,9 +217,22 @@ export function commandHelp_get(command) {
|
|
|
971
217
|
const declaration = commandDeclaration_get(command);
|
|
972
218
|
const help = declaration !== undefined && declaration_isParsed(declaration)
|
|
973
219
|
? declarationHelp_derive(declaration)
|
|
974
|
-
: commandHelpEntry_get(command);
|
|
220
|
+
: commandHelpEntry_get(command) ?? subcommandHelp_get(command);
|
|
975
221
|
return help ? commandHelp_render(command, help) : undefined;
|
|
976
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* A declared command's subcommand's help, for a topic of two words (`pacs query`).
|
|
225
|
+
*
|
|
226
|
+
* @param topic - The topic.
|
|
227
|
+
* @returns The help, or undefined when the topic names no declared subcommand.
|
|
228
|
+
*/
|
|
229
|
+
function subcommandHelp_get(topic) {
|
|
230
|
+
const words = topic.split(' ');
|
|
231
|
+
if (words.length !== 2)
|
|
232
|
+
return undefined;
|
|
233
|
+
const declaration = commandDeclaration_get(words[0]);
|
|
234
|
+
return declaration !== undefined && declaration_isParsed(declaration) ? subcommandHelp_derive(declaration, words[1]) : undefined;
|
|
235
|
+
}
|
|
977
236
|
/**
|
|
978
237
|
* Renders contextual help for one registered pipeline executable.
|
|
979
238
|
*
|
|
@@ -1118,28 +377,76 @@ export function args_checkHasHelpFlag(args, command) {
|
|
|
1118
377
|
if (declaration !== undefined && declaration_isParsed(declaration)) {
|
|
1119
378
|
const groups = [
|
|
1120
379
|
declaration.grammar.options ?? {},
|
|
380
|
+
declaration.grammar.bare?.options ?? {},
|
|
1121
381
|
...Object.values(declaration.grammar.subcommands ?? {}).map((sub) => sub.options ?? {}),
|
|
1122
382
|
];
|
|
1123
383
|
const takesH = groups.some((group) => Object.values(group).some((option) => option.short === 'h'));
|
|
1124
384
|
return !takesH && args.includes('-h');
|
|
1125
385
|
}
|
|
1126
|
-
// Commands not yet declared where -h means human-readable sizes, not help
|
|
1127
|
-
const humanReadableCommands = ['du'];
|
|
1128
|
-
if (command && humanReadableCommands.includes(command)) {
|
|
1129
|
-
return false;
|
|
1130
|
-
}
|
|
1131
386
|
if (isPluginExecutable) {
|
|
1132
387
|
return false;
|
|
1133
388
|
}
|
|
1134
389
|
return args.includes('-h');
|
|
1135
390
|
}
|
|
391
|
+
/** What a `help` line may hold. */
|
|
392
|
+
const HELP_GRAMMAR = {
|
|
393
|
+
operands: [
|
|
394
|
+
{ name: 'topic', kind: 'word', optional: true, repeat: true, summary: 'A command, a section or a Shell topic; help pacs query, a subcommand' },
|
|
395
|
+
],
|
|
396
|
+
};
|
|
1136
397
|
/**
|
|
1137
|
-
*
|
|
398
|
+
* `help [topic…]`: the declaration.
|
|
1138
399
|
*
|
|
1139
|
-
* @
|
|
400
|
+
* @example
|
|
401
|
+
* ```ts
|
|
402
|
+
* commands_register({ declarations: [helpCommand] });
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
export const helpCommand = command_declare({
|
|
406
|
+
name: 'help',
|
|
407
|
+
grammar: HELP_GRAMMAR,
|
|
408
|
+
help: {
|
|
409
|
+
summary: 'Display help information',
|
|
410
|
+
description: 'Display help information',
|
|
411
|
+
category: 'General',
|
|
412
|
+
examples: [
|
|
413
|
+
'help # List all commands',
|
|
414
|
+
'help games # The /usr/games shelf, by category',
|
|
415
|
+
'help ls # Show help for ls',
|
|
416
|
+
'help timing # Show help for timing',
|
|
417
|
+
],
|
|
418
|
+
},
|
|
419
|
+
holds: [],
|
|
420
|
+
handler: async (args) => help_answer(args.operands.topic),
|
|
421
|
+
});
|
|
422
|
+
/**
|
|
423
|
+
* `help` over words already split: the declaration's parse and handler.
|
|
424
|
+
*
|
|
425
|
+
* @param args - The words after `help`.
|
|
426
|
+
* @returns The page, or the refusal of a bad line.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```ts
|
|
430
|
+
* await builtin_help(['ls']);
|
|
431
|
+
* ```
|
|
1140
432
|
*/
|
|
1141
433
|
export async function builtin_help(args) {
|
|
1142
|
-
|
|
434
|
+
return declaredCommand_run(helpCommand, args);
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* The help page a topic names: bare, the table of contents; else a section,
|
|
438
|
+
* a Shell topic, a command, or what the backend answers for the name.
|
|
439
|
+
*
|
|
440
|
+
* @param topic - The words naming it (two for a subcommand: `pacs query`).
|
|
441
|
+
* @returns The page.
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```ts
|
|
445
|
+
* await help_answer(['PACS']);
|
|
446
|
+
* ```
|
|
447
|
+
*/
|
|
448
|
+
export async function help_answer(topic) {
|
|
449
|
+
const commandName = topic.length > 0 ? topic.join(' ') : undefined;
|
|
1143
450
|
// The variables: the core's page, with whatever the backend keeps too.
|
|
1144
451
|
if (commandName === 'variables') {
|
|
1145
452
|
const backendPage = (await backendInstalled_get()?.fallback?.help?.('variables')) ?? null;
|