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

Added ANSI coloring to haxelib help command #637

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

ninjamuffin99
Copy link
Contributor

Will be looking for a bit more feedback on cleanup, but added ANSI coloring to the haxelib help command

image

Things yet to implement

  • Use the same environment variable that hxcpp uses to disable ansi codes for coloring
  • I based the ansi related code off the haxe-strings implementation with a few changes, will poke around to make sure it's credited / licensed properly

ansi usage is to add

using haxelib.client.ansi.Ansi;

and then on any string you can add ANSI via one of the functions from Ansi.hx with the enums from AnsiColor.hx or AnsiTextAttribute.hx
Cli.print("epic".fg(RED));
will print
epic in red

@skial skial mentioned this pull request Aug 7, 2024
1 task
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.

1 participant