insert output at right place (after prompt), always insert a prompt after a command
fixes #13