zackargyle/react-bash

help doesn't seem to include newly added commands

Closed this issue · 2 comments

Happy to build this out if you have any ideas :)

We're working on an implementation to help demo some web3 concepts at web3-terminal.theblockchaininstitute.org.

Really love your work!

You're totally right! I haven't worked on this project for a while, but it looks like all you'd need to do is:

  1. In commands.js
let newCommands = [];
export const setNewCommands = commands => {
  newCommands = commands;
};

Then add ...newCommands.map(value => ({ value })) to the help command

  1. In component.js: both componentDidMount and componentDidReceiveProps
if (extensions) {
  setNewCommands(extension);
}

D'oh! Thanks

Going to give this a try today!