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

[Question] Could herbe interpret ansi escape sequences? #17

Open
broccoli5 opened this issue Oct 5, 2020 · 3 comments
Open

[Question] Could herbe interpret ansi escape sequences? #17

broccoli5 opened this issue Oct 5, 2020 · 3 comments

Comments

@broccoli5
Copy link

Could herbe interpret ansi escape sequences? It would be really useful with some commands like cal which use* ansi escape sequence to highlight current date.

*(at least it seems like it does)

If it's not possible for what ever reason (or would add unnecessary complexity (I like my programs minimal ;) )), supporting multiple text colors would also be awesome (with it's own escape codes like e.x. %c0 %c1, etc.), but if there isn't simple way of doing this, or it's more fit for a patch, I won't mind not having it.

PS: Thank you dudik, herbe is awesome!

@dudik
Copy link
Owner

dudik commented Oct 8, 2020

I don't really see a reason why it wouldn't be possible. Sadly, a few weeks ago a new semester started and I think that I shouldn't put my hobbies before school. I will try to fix minor bugs if they appear, but I would rather not work on new features/patches. I'm really sorry. I like your idea and it would make a great patch, but I won't be able to work on it in the next few months. Thank you for your input and overall for using herbe. It means a lot to me.

@broccoli5
Copy link
Author

@dudik No problem! I get where you are coming from, I'm trying to learn c so I might come up with something myself, I will see. And good luck with school!

@dudik dudik closed this as completed Oct 8, 2020
@dudik dudik reopened this Oct 8, 2020
@N-R-K
Copy link

N-R-K commented Mar 9, 2022

Honestly, don't think this is a good idea. Traditional 8/16/256 color sequences don't represent actual rgb colors. You'll need to maintain your own color-table and index into it. This (obviously) means that your terminal color and herbe colors will be out of sync.

Maybe parsing the true color sequences makes more sense for a GUI program. Though I think that's still unnecessary complexity.

And of course if true color is implemented, there's going to be (I assume) lots of request for parsing the tradition color sequences as well, because not all terminal programs support true color sequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants