Built-in --help does not column-align the help message

Issue #11 resolved
Former user created an issue

The automatic -h or --help self-documenting feature is really cool, but it would be even nicer if the columns of text that it prints out were aligned. It seems that long --option style options force the description field to jump an extra tab to the right, and short ones to the left, which produces a ragged appearance.

positional arguments:
  input         Directory to copy from
  output            Directory to copy to

flags:
  -h, --help            show this help message and exit
  -v, --verb            Extra diagnostic output
  -d, --del         Delete output folder if already exists

optional arguments:
  -x, --opts OPTS           RDS file containing argument values
  -s, --seed SEED           PRNG seed [default: 999]
  -z, --sleep SLEEP         Sleep loop duration [default: 10]
  -n, --min MIN         Min job life in snooze periods [default: 4]
  -y, --decay DECAY         Job percent decay per snooze [default: 25]
  -a, --max MAX         Max decay periods [default: 6]
  -j, --njobs NJOBS         Simultaneous jobs [default: 10]
  -p, --pfail PFAIL         Percent of jobs that fail [default: 0]

Comments (3)

  1. Shing Wan Choi

    Coincidentally, I have the same problem. So I have modified the print.arg.parser function and created a pull request. Maybe you can check that out

  2. Log in to comment