Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shell functions for skipping part of a tutorial/demo #7

Open
veracioux opened this issue Oct 15, 2021 · 0 comments
Open

Add shell functions for skipping part of a tutorial/demo #7

veracioux opened this issue Oct 15, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@veracioux
Copy link
Owner

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.

‼️ Make sure to document the new features in the man page. ‼️

@veracioux veracioux added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 15, 2021
@veracioux veracioux changed the title Add support for debug markers Add shell functions for skipping part of a tutorial/demo Oct 15, 2021
@veracioux veracioux pinned this issue Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant