Skip to content

Formatting uses trailing zeros when using std::cout << program' #409

@frun36

Description

@frun36

Hi, I have noticed a weird thing:
When I add the default -h option to my program call, the help menu displays as intended:

$ ./test -h
Usage: test [--help] [--version] [--debug] mode

Positional arguments:
  mode           Operation mode: 'run' (single pass of the tester) or 'dim' (run a DIM server accepting commands)

Optional arguments:
  -h, --help     shows help message and exits
  -v, --version  prints version information and exits
  -d, --debug    Enable debug mode

this also works when using std::cerr << program;

However, when I use std::cout << program;, the output looks like so:

$ ./test -
Usage: test [--help] [--version] [--debug] mode

Positional arguments:
  mode000000000  Operation mode: 'run' (single pass of the tester) or 'dim' (run a DIM server accepting commands)

Optional arguments:
  -h, --help000  shows help message and exits
  -v, --version  prints version information and exits
  -d, --debug00  Enable debug mode

With those weird trailing zeros in the formatting. Is this a bug, or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions