terminal.js: add command parsing(partially)