-
Notifications
You must be signed in to change notification settings - Fork 3
Description
When I create tuterm scripts, I often want to test out a certain portion of the tutorial starting somewhere from the middle. What I can do is comment out the part of the code that I want to skip. But this is annoying, and it comes with a problem:
What if those previous commands create or modify files that are necessary for the rest of the tutorial/demo to run correctly?
I propose the following solution: add SKIP
and UNSKIP
shell functions. SKIP
sets a kind of state flag that indicates that all the commands that follow should be skipped. UNSKIP
should do the opposite: unset the flag so that the commands that follow are not skipped.
cmdline ... # Runs normally
SKIP
message "open a file" # Skipped
cmdline xdg-open file # Skipped
UNSKIP
cmdline ... # Runs normally
What do skipped commands do?
Regardless of the mode the user specified, they should behave as if tuterm were started with the --mode demo --fast
options, along with any other arguments that may have been given by the user.