
FUNCTION interpret(text) {
	status (text)

	k = index(text, " ")
	key = (k != 0)? substr(text, 1, k - 1): text;
	cmd = (k != 0)? substr(text, k+1): "";
	if (key == "!") {
		status(cmd)
		exec(cmd, 1)
		}
	else if (key == "dos") {
		status(cmd)
		dos(cmd " >output");
		f2c("output")
		}
	else if (text == "bye")
		exit()
	else if (text != "")
		eval(text) |: status()

	return (0);
	}


/shift F9 "kommando ausfhren"/ {
	if ((x = input("interactive", "Kommando:", "", lastcmd)) != "\z") {
		interpret(lastcmd = x);
		}
	}



BEGIN {
	if (WINtext == "")
		ctrl(2, "interactive")

	if (WINkey + 0 == 0)
		ctrl(3, 120)
	}
