Flag to clear the terminal before outputting text#12
Open
solarisfire wants to merge 2 commits intojrnxf:mainfrom
Open
Flag to clear the terminal before outputting text#12solarisfire wants to merge 2 commits intojrnxf:mainfrom
solarisfire wants to merge 2 commits intojrnxf:mainfrom
Conversation
…g any content. Useful when piping text to the command and wanting a clean slate to read from.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Addition of a clear screen flag (-w for wipe) which does a simple clear of the terminal before outputting stylized text.
Why: I hve text flowing out of a program that I was piping to fsrx, that left a bunch of output above the text I was trying to read and I found this fatiguing. Clearing the screen makes for a nicer reading experience, but I couldn't find an elegant way to do this without writing the text to a file, clearing the screen, then using fsrx to read the file.
How: Addition of the wipe flag as a simple boolean, simple if statement within the main function, if set it then runs print!("\x1B[2J\x1B[1;1H"); which seems to be the lightest weight way to clear the terminal nicely.
Checklist:
Allow edits from maintainersoption checked[your_username]/(ex.thatvegandev/featureX)It's such a small change that I believe it should be fine.
First time ever working with Rust, so I'm a complete newbie... So please educate me if I've done anything stupid!