aboutsummaryrefslogtreecommitdiff
path: root/qml/commands.js
blob: 7d4bdcf7fbfe535f5e7f8dc006151332e8154f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function execute(command) {
	var msg = function(name) {
		console.log('"' + name + '"' + " is not implemented.");
	};
	var args = command.split(' ');

	try {
		var closure = eval(args[0]);

		if ( typeof closure === "function" ) {
			args.shift();
			closure(args);
		} else {
			msg(args[0]);
		}
	} catch (exception) {
		msg(args[0]);
	}
}

function exec(args) {
	eval(args.join(' '));
}

function next() {
	terminalList.selectNext();
}

function prev() {
	terminalList.selectPrev();
}

function jump(index) {
	terminalList.selectItem(index);
}