More prompt in debugger

Is there a way to suppress [more] prompt in the debugger when running a script with @restore command?

I haven’t found one, but I’d also be very interested to know. I’ve implemented an equivalent to Inform’s test scripts (so that I can say TEST INTRO or whatever and have it feed the appropriate commands to the game) and it gets bogged down by [more] prompts all the time.

1 Like

if i copy the plain text of my restore file and paste it into the debugger after (restart) it zips through the whole thing in one go. or is this not what you’re talking about?

1 Like

Nice, that would do the trick indeed. Thanks!

Something like that, but I want to have multiple test scripts and automate the process somewhat instead of copying and pasting every time.

In term_tty.c commenting out morefunc(); line, disables [more] prompts. You might want to rename the resulting dgdebug and use it for automated testing, and use the original for interactive use.

int term_sendlf() {
	fputc('\n', stdout);
	unread_lines++;
	if(term_height > 1 && isatty(1)) {
		if(unread_lines >= term_height - 1) {
			term_effectstyle(0);
			fflush(stdout);
//			morefunc();
			unread_lines = 0;
			return 1;
		}
	} else {
		unread_lines = 0;
	}
	return 0;
}

Edit: And here are modified versions of debugger.c and term_tty.c. They add a command line option(-M, or --nomore) to start the debugger with [more] prompts disabled. They also add an interactive @more command to enable/disable [more] prompts while the debugger is running. dgdebug --help and @help updated with the new option and command.
moreprompts.zip (14.7 KB)

2 Likes

Oh, and of course since it checks isatty(1), I can also just pipe the output to tee! But that also loses all the styling, so your solution is superior.