5 Terminal: Adding Commands
Innovation Inc edited this page 2020-05-14 19:06:21 -05:00

Terminal: Adding Commands

Adding Commands Permanently

The terminal, which runs on JavaScript, can have commands added to it.

Step 1

Open the terminal file. It is located at terminal/terminal.js

Add the name of your command to the list.

Step 2

Add your code using the basic framework below. It should look like this:

case 'mycommand':
    //Your code goes here
  break;

Make your modifications and save the file.

Step 3

Open the terminal and run the command by typing its name. You should also be able to see it when running "help".

Adding Commands Temporarily With Modules

Modules are a way of temporarily adding functions to DremJS. Documentation on it can be found here.