Skip to content

Instantly share code, notes, and snippets.

@Swivelgames
Last active June 8, 2016 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Swivelgames/7eb9fcb60b2373c0fc2020b00b3c72b1 to your computer and use it in GitHub Desktop.
Save Swivelgames/7eb9fcb60b2373c0fc2020b00b3c72b1 to your computer and use it in GitHub Desktop.
test
var os = require('os');
var fs = require('fs');
global.Terminal.emit('echo', "Included OS, FS");
global.Terminal.registerCommand('cat', function (parts, raw, terminal) {
terminal.emit('echo', fs.readFileSync(parts[1]) + os.EOL);
terminal.emit('commandExit');
});
global.Terminal.emit('echo', "Attempted to register command `cat`");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment