Skip to content

Commit

Permalink
fix(Command.ts): Command descriptions formatting
Browse files Browse the repository at this point in the history
n
  • Loading branch information
dedoussis committed Feb 22, 2020
1 parent 1620131 commit 0157fdf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algebrain",
"version": "0.0.4-d",
"version": "0.0.5",
"description": "Combuter Algebra System focusing on symbolic transformations",
"keywords": [
"algebra",
Expand Down
16 changes: 10 additions & 6 deletions src/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,16 @@ export const commandRegistry: Map<CommandName, CommandSpec> = Map([
executeConstructor: (_: Command): ExecuteFunc => (namespace: Namespace) => {
return {
namespace: namespace,
stdOut: `--- algebrain version 0.0.4-b ---
Commands:
${commandRegistry
.entrySeq()
.map(([name, spec]: [CommandName, CommandSpec]) => `- ${name}: ${spec.description}`)
.join('\n')}`,
stdOut: List(['--- algebrain version 0.0.5 ---', 'Commands:'])
.concat(
commandRegistry
.entrySeq()
.map(
([name, spec]: [CommandName, CommandSpec]) =>
`- ${name}: ${spec.description}`
)
)
.join('\n'),
};
},
description: 'Print this message',
Expand Down

0 comments on commit 0157fdf

Please sign in to comment.