Skip to content

Apply ANSI colors to synopsis/Usage line #462

@stalep

Description

@stalep

Summary

The Options section in help output has ANSI color styling (yellow for option names, cyan for value placeholders), but the synopsis/Usage line is plain text with no colors.

Current output

Usage: jbang run [-hinx] [-R=<runtime-option>] [--jfr] [-d=<debug>]
                  [--enableassertions] [--enablesystemassertions]
                  ...

No colors in the synopsis line, even though the Options section below uses yellow/cyan.

Expected

Apply the same color scheme to the synopsis line:

  • Yellow for option/flag names ([-hinx], [--jfr], [--enableassertions])
  • Cyan for value placeholders (<runtime-option>, <debug>, <scriptOrFile>)
  • Bold for the command name (jbang run)

This would match picocli's behavior where the synopsis had the same styling as the options list, making it easier to visually parse the dense synopsis line.

Context

Found in jbang (jbangdev/jbang#2453). The options section already has colors (#454), but the synopsis does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions