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.
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?
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)
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.
i’m thinking the answer it ‘no’ but is there any way to automate a play through or feed a script to the A-machine?
JS interpreter doesn’t seem to have this feature. The closest thing to actually automate a test script in Å-machine is running it with dgdebug, probably. Linus’s post here gives an example for that. If you have known it already, please disregard this. ; )
i think i’ve just gotten so spoiled by and used to dgdebug that i’ve gotten greedy.