Skip to content

[Clopts] Add colours #2

@Sirraide

Description

@Sirraide

VLC’s --help and -H printouts look pretty nice; perhaps we could ‘take inspiration’ from that. This would entail:

  • Adding some way of specifying colours, probably through a single colo(u)rs<...> type. Also add some default themes because why not.
  • Adding another builtin option type (like help<>) that adds a --colo(u)r option that allows users to disable/enable colours from the command line. This should probably passed in together with the colour configuration. It would probably be a good idea if all of the colour configuration is handled via the colo(u)rs<...> type, possibly w/ subtypes.
  • Actually implementing the option type in question in the printer, as well as precalculating several help messages.
  • By default, it should use isatty() to determine whether or not to print colours.
  • Add support for 3×256-bit colours (yes, there are ANSI escape codes for that).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions