Skip to content

Conversation

Managor
Copy link
Member

@Managor Managor commented Aug 14, 2025

No description provided.

Copy link
Member

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the addition. I have tested the changes locally.


Would it be possible to apply custom color for the warning or entire line to make it look distinct?

image

This is how it looks in tlrc:

image

@Managor
Copy link
Member Author

Managor commented Aug 14, 2025

Kinda dumb for the code to use self-defined colors instead of just using colorama globally

@Managor
Copy link
Member Author

Managor commented Aug 14, 2025

I really want to get rid of the linter. This arbitrary line length restriction really grinds my nerves when the language is designed to autoindent

@kbdharun kbdharun self-assigned this Aug 15, 2025
@kbdharun kbdharun marked this pull request as draft August 15, 2025 05:59
@kbdharun
Copy link
Member

kbdharun commented Sep 4, 2025

Refactored the code a bit to use colored similar to other places in the codebase to be consistent and also to reduce reliance on the colorama dep since it's not needed in any platforms except Windows legacy Command prompt (where color stripping doesn't work, if you use Windows terminal as default for Command Prompt then you will have proper color rendering without colorama).

This is CMD in Windows terminal (without colorama):

image

This is the same in legacy CMD Prompt:

image

With colorama it looks like this:

image

The previous colored implementation had a bug where coloring was applied even in Markdown rendering:

image

Fixed it too:

image

@kbdharun kbdharun marked this pull request as ready for review September 4, 2025 15:12
@Managor
Copy link
Member Author

Managor commented Sep 4, 2025

Using colorama globally would make the code more legible. In the end it will output the exact same escape sequences anyways.
I've moved to using tput setaf in my prompt strings because littering escape sequences makes it impossible to read.

@kbdharun kbdharun merged commit 9d15270 into main Sep 4, 2025
55 checks passed
@kbdharun kbdharun deleted the warning branch September 4, 2025 16:15
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.

3 participants