-
Notifications
You must be signed in to change notification settings - Fork 674
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
ANSI colors in prompt string #150
Comments
It's worth mentioning that readline gets around this by using |
Semi-duplicate of #25 |
@aleclarson I would re-open this - I don't consider this a duplicate of #25. On a side note: what GNU readline does for this is uses |
This is in fact an explicitly stated sub issue of #25 and I encourage you to read the discussion in full. Linenoise code isn't as abstracted as GNU Readline, that is by design. This version of linenoise has multibyte and ANSI color Right Now in C++, and works on windows too.
If you need to use multibyte and ANSI in C then this one will work:
ANSI color was an issue for me early on and that issue is resolved by the discussion in #25 and the corrected UTF-8 character counting implemented by @yhirose. |
I'm using https://github.com/hoelzro/lua-linenoise and noticed that the prompt string cannot contain non-printed characters without messing up tab completion, which must be due to incorrect string length calculation. My use case is ANSI coloring (256 spectrum).
hoelzro/lua-linenoise#15
The text was updated successfully, but these errors were encountered: