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

Add colors to the prompt #73

Closed
wants to merge 1 commit into from
Closed

Add colors to the prompt #73

wants to merge 1 commit into from

Conversation

certik
Copy link
Collaborator

@certik certik commented Sep 8, 2024

Fixes #29.

It works, but on Windows the cursor starts at the wrong column.

Linux:

image

Windows:

image

@wolfv any idea what might be causing this? I think on Windows it counts the number of characters in the string to offset the column (while it should skip the escape color sequences), but it doesn't do it on linux for some reason.

It works, but on Windows the cursor starts at the wrong column.
@certik certik marked this pull request as draft September 8, 2024 02:40
@wolfv
Copy link
Member

wolfv commented Sep 8, 2024

I think we might need to use the Highlighter of rustyline and figure out how to use highlight_prompt. I'll take a look!

@wolfv
Copy link
Member

wolfv commented Sep 8, 2024

I think we have to follow this example and implement a helper that has the colored_prompt.

@certik
Copy link
Collaborator Author

certik commented Sep 8, 2024

Fixed in #79.

@certik certik closed this Sep 8, 2024
@certik certik deleted the colors2 branch September 8, 2024 15:12
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

Successfully merging this pull request may close these issues.

Enable colors in the prompt
2 participants