-
Notifications
You must be signed in to change notification settings - Fork 70
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
export ansi_string()
#573
Comments
We could do that. The caveat is that cli does not handle all ANSI control codes, and right now ansi_string objects only contain ANSI codes that it supports. If you can mark arbitrary strings as ansi_string objects, then that's not necessarily true any more. But I don't think this is a big danger, so we can do this. Do you want to submit a PR? No pressure at all, just asking. 😄 |
I take your point, but even with some missing functionality I think there will still be a better user experience when using an
Yep, happy to. |
Sure, the class will get you the printing. But it is a very fragile class, and it is very easy to lose it:
Which is something that we just need to accept. |
I'm looking for a way to take an existing character vector with ANSI control codes and treat it as a
cli_ansi_string
object. Now I could do this by just setting the class of the vector, but I would prefer using a public function for this.ansi_string
seems to have some other encoding logic in it too. Internally it seems that you useansi_string()
to do this. Could this become part of the public API?The text was updated successfully, but these errors were encountered: