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

Colored output for sh and shell commands #3

Open
jhmaster2000 opened this issue Feb 8, 2022 · 1 comment
Open

Colored output for sh and shell commands #3

jhmaster2000 opened this issue Feb 8, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request todo Things I generally already know how to do/fix, just don't have the time or mood to do at the time.

Comments

@jhmaster2000
Copy link
Owner

This can now be achieved since Discord added (limited*) support for TTY color codes on ANSI codeblocks. It's currently desktop only and probably will stay that way for a long time considering the history of syntax highlighting on mobile, therefore a new --mobile (short --m) flag needs to be added to both commands to strip color codes so they don't leak and trash the mobile output.

The child_processes themselves also need to be able to receive the color codes, in a crossplatform (Windows & Linux) way. Refs:

@jhmaster2000 jhmaster2000 added enhancement New feature or request todo Things I generally already know how to do/fix, just don't have the time or mood to do at the time. labels Feb 8, 2022
@jhmaster2000 jhmaster2000 self-assigned this Feb 8, 2022
@jhmaster2000
Copy link
Owner Author

  • Discord ANSI codes are limited in the following ways:
  • Only primary colors work, not secondary.
  • Extended color doesn't work.
  • Some colors don't really match their official ANSI name.

Example codeblock (ANSI):

�[1;30mC�[31mO�[32mL�[33mO�[34mR�[35mM�[36mA�[37mT�[31mI�[34mC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request todo Things I generally already know how to do/fix, just don't have the time or mood to do at the time.
Projects
None yet
Development

No branches or pull requests

1 participant