Skip to content

Commit 9ce22a3

Browse files
committed
Print a tutorial list if not provided a tutorial name
1 parent 252b990 commit 9ce22a3

File tree

8 files changed

+31
-12
lines changed

8 files changed

+31
-12
lines changed

lib/node_modules/@stdlib/repl/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ Stops saving commands to a file path associated with a specified record identifi
917917
// TODO
918918
```
919919

920-
#### tutorial( \[text, \[options]] )
920+
#### tutorial( \[name, \[options]] )
921921

922922
Starts a tutorial.
923923

@@ -937,7 +937,7 @@ The function accepts the following `options`:
937937

938938
A few notes:
939939

940-
- When not provided a tutorial `name`, the function returns a list of available tutorials.
940+
- When not provided a tutorial `name`, the function prints a list of available tutorials.
941941
- If a specified workspace already exists, the workspace is silently cleared and a new tutorial [presentation][@stdlib/repl/presentation] bound. In order to preserve an existing workspace, specify an alternative tutorial workspace name.
942942

943943
#### userDoc( alias, \[ref,] doc )

lib/node_modules/@stdlib/repl/data/help.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ reset,"\nreset()\n Resets the REPL.\n\n Examples\n --------\n > rese
3434
save,"\nsave( fpath )\n Saves previous commands to a specified file path.\n\n Parameters\n ----------\n fpath: string\n File path.\n\n Examples\n --------\n > save( './path/to/file.txt' )\n\n See Also\n --------\n load, saveStart, saveStop\n\n"
3535
saveStart,"\nsaveStart( fpath )\n Starts saving commands to a specified file path.\n\n Parameters\n ----------\n fpath: string\n File path.\n\n Returns\n -------\n id: number\n Record identifier.\n\n Examples\n --------\n > var id = saveStart( './path/to/file.txt' );\n > 1 + 1\n 2\n > 'foo'\n 'foo'\n > saveStop( id );\n\n See Also\n --------\n save, saveStop\n\n"
3636
saveStop,"\nsaveStop( id )\n Stops saving commands to a file path associated with a specified record\n identifier.\n\n Parameters\n ----------\n id: number\n Record identifier.\n\n Returns\n -------\n bool: boolean\n Boolean indicating whether the REPL successfully stopped saving\n evaluated commands.\n\n Examples\n --------\n > var id = saveStart( './path/to/file.txt' );\n > 1 + 1\n 2\n > 'foo'\n 'foo'\n > saveStop( id );\n\n See Also\n --------\n save, saveStart\n\n"
37-
tutorial,"\ntutorial( [name, [options]] )\n Starts a tutorial.\n\n When not provided a tutorial, the function returns a list of available\n tutorials.\n\n If a specified workspace already exists, the workspace is silently cleared\n and a new tutorial presentation bound. In order to preserve an existing\n workspace, specify an alternative tutorial workspace name.\n\n Parameters\n ----------\n name: string (optional)\n Tutorial name.\n\n options: Object (optional)\n Tutorial options.\n\n options.borderTop: string (optional)\n Top border character sequence. Default: '*'.\n\n options.borderBottom: string (optional)\n Bottom border character sequence. Default: '*'.\n\n options.borderLeft: string (optional)\n Left border character sequence. Default: '* '.\n\n options.borderRight: string (optional)\n Right border character sequence. Default: ' *'.\n\n options.counter: string|boolean (optional)\n Slide counter. If `true`, each tutorial slide displays a slide counter.\n If set to 'progress', each tutorial slide displays a progress counter.\n If `false`, no counter is displayed. Default: 'progress'.\n\n options.workspace: string (optional)\n REPL workspace name. A tutorial presentation adds commands to the\n specified workspace, thus allowing tutorial navigation and interaction.\n Default: `'tutorial-<name>-<n>'`, where `name` is the tutorial name and\n `n` is an assigned tutorial presentation identifier.\n\n options.autoClear: boolean (optional)\n Boolean indicating whether to automatically clear the screen before\n writing a rendered tutorial slide to the REPL. Default: true.\n\n Returns\n -------\n out: Array|integer\n Tutorial presentation identifier or an array of available tutorials.\n\n Examples\n --------\n > var id = tutorial( 'repl' );\n\n See Also\n --------\n presentationStart, presentationStop, workspace, workspaces\n\n"
37+
tutorial,"\ntutorial( [name, [options]] )\n Starts a tutorial.\n\n When not provided a tutorial name, the function prints a list of available\n tutorials.\n\n If a specified workspace already exists, the workspace is silently cleared\n and a new tutorial presentation bound. In order to preserve an existing\n workspace, specify an alternative tutorial workspace name.\n\n Parameters\n ----------\n name: string (optional)\n Tutorial name.\n\n options: Object (optional)\n Tutorial options.\n\n options.borderTop: string (optional)\n Top border character sequence. Default: '*'.\n\n options.borderBottom: string (optional)\n Bottom border character sequence. Default: '*'.\n\n options.borderLeft: string (optional)\n Left border character sequence. Default: '* '.\n\n options.borderRight: string (optional)\n Right border character sequence. Default: ' *'.\n\n options.counter: string|boolean (optional)\n Slide counter. If `true`, each tutorial slide displays a slide counter.\n If set to 'progress', each tutorial slide displays a progress counter.\n If `false`, no counter is displayed. Default: 'progress'.\n\n options.workspace: string (optional)\n REPL workspace name. A tutorial presentation adds commands to the\n specified workspace, thus allowing tutorial navigation and interaction.\n Default: `'tutorial-<name>-<n>'`, where `name` is the tutorial name and\n `n` is an assigned tutorial presentation identifier.\n\n options.autoClear: boolean (optional)\n Boolean indicating whether to automatically clear the screen before\n writing a rendered tutorial slide to the REPL. Default: true.\n\n Returns\n -------\n out: integer|void\n Tutorial presentation identifier.\n\n Examples\n --------\n > var id = tutorial( 'repl' );\n\n See Also\n --------\n presentationStart, presentationStop, workspace, workspaces\n\n"
3838
userDoc,"\nuserDoc( alias, [ref,] doc )\n Adds user-defined documentation.\n\n If user-defined documentation already exists for the provided alias, the\n current documentation is overwritten.\n\n Parameters\n ----------\n alias: string\n Documentation alias.\n\n ref: any (optional)\n Object reference.\n\n doc: string\n Documentation.\n\n Examples\n --------\n > function foo() {};\n > userDoc( 'foo', foo, '\nfoo()\n Foo bar.\n' );\n > help( foo )\n\n See Also\n --------\n help\n\n"
3939
vars,"\nvars( [options] )\n Returns a list of variable names in the current workspace.\n\n Parameters\n ----------\n options: Object (optional)\n Options.\n\n options.include: RegExp (optional)\n Variable name inclusion filter.\n\n options.exclude: RegExp (optional)\n Variable name exclusion filter.\n\n options.types: ArrayLikeObject (optional)\n Variable type inclusion filter(s).\n\n options.details: boolean (optional)\n Boolean indicating whether to include additional variable details, such\n as variable type, contents, etc. Default: false.\n\n Examples\n --------\n > vars()\n > vars( { 'details': true } )\n\n See Also\n --------\n help, info, varsWorkspace\n\n"
4040
varsWorkspace,"\nvarsWorkspace( [name, ][options] )\n Returns a list of variable names in a specified workspace.\n\n Parameters\n ----------\n name: string (optional)\n Workspace name. Default: the current workspace.\n\n options: Object (optional)\n Options.\n\n options.include: RegExp (optional)\n Variable name inclusion filter.\n\n options.exclude: RegExp (optional)\n Variable name exclusion filter.\n\n options.types: ArrayLikeObject (optional)\n Variable type inclusion filter(s).\n\n options.details: boolean (optional)\n Boolean indicating whether to include additional variable details, such\n as variable type, contents, etc. Default: false.\n\n Examples\n --------\n > varsWorkspace()\n > varsWorkspace( 'base' )\n > varsWorkspace( { 'details': true } )\n\n See Also\n --------\n vars, workspaces\n\n"

lib/node_modules/@stdlib/repl/data/help.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)