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

Could you support standard ANSI intensity format? #97

Closed
laike9m opened this issue Mar 14, 2017 · 5 comments
Closed

Could you support standard ANSI intensity format? #97

laike9m opened this issue Mar 14, 2017 · 5 comments

Comments

@laike9m
Copy link

laike9m commented Mar 14, 2017

According to https://en.wikipedia.org/wiki/ANSI_escape_code, one can add ;1 to display bright/bold text. But this currently doesn't work in bpython, instead, I have to prefix colored text with \033[1m to get bold effect.

screen shot 2017-03-14 at 11 33 11 pm

The inconsistency with standard ANSI escape code brings trouble to code that relies on it. Taking my current work pdir2 as an example, color can't be properly displayed in bpython.

I would like to know if you have plan to support this? I understand that it may conflicts with the current design/API, and it's totally ok if you don't.

@laike9m laike9m changed the title Could you support the standard ANSI intensity format? Could you support standard ANSI intensity format? Mar 14, 2017
@thomasballinger
Copy link
Member

This is absolutely doable! I can't commit to doing it in the immediate future, but it's just some parsing code that needs to change.

@laike9m
Copy link
Author

laike9m commented Mar 15, 2017

Sure. I'll find a workaround for now until you add this feature.

@thomasballinger
Copy link
Member

If you want to hack it yourself or open a PR, check out https://github.com/thomasballinger/curtsies/blob/master/curtsies/escseqparse.py

@laike9m
Copy link
Author

laike9m commented Mar 15, 2017

I think I'll just use a different kind of escape code for bpython, putting \033[1m in front.

@ata2001
Copy link
Contributor

ata2001 commented Apr 2, 2017

Created PR: #98.

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