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
refactor: Move ANSI escaping into its own functions #866
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM if we can get the conflicts sorted out 👍 |
Oh....yeahhhhh 😅 So I tried to rebase this after the shell enum change, failed miserably, and somehow wound up with a pile of code that had merge conflict markers committed into it. I had planned to try again at some point, and I guess I just forgot. |
headdesk What the heck did I just do?? |
Description
Moves ANSI colorseq escape functionality into its own functions and adds tests.
Motivation and Context
One of the proposed changes in #865 involved escaping an ANSI code from within
print.rs
. Currently, escaping these sequences is done inside of a closure insidemodule
, which prevents it from being used elsewhere.This change allows us to escape unprintable characters from anywhere inside starship, as well as allowing a greater variety of escape sequences and tests specific to the escape parser (as opposed to just the module string generator).
Types of changes
Refactoring
Screenshots (if appropriate):
How Has This Been Tested?
Checklist: