lib/cli: help text generator #30

Closed
opened 2022-07-15 05:09:10 +02:00 by BodgeMaster · 3 comments

The function is there waiting for an implementation.

Another idea stolen from SerenityOS...

The function is there waiting for an implementation. Another idea stolen from SerenityOS...
BodgeMaster added the
TODO
label 2022-07-15 05:09:10 +02:00
BodgeMaster added a new dependency 2022-07-15 13:58:07 +02:00

desired format:

Help:  command

  short description

Usage: command [-fghij] [-o OPTION] [-p ANOTHER_OPTION] ARGUMENT1 ARGUMENT2

Flags:
  -f, --flag
    whatever it does
  -g, --glag
    whatever this is for
  -h, --hlag
    the purpose of this
  -i, --ilag
    how you would use that
  -j, --unexpected-example
    No. I am not explaining this option. Deal with it.

Options:
  -o OPTION, --option=OPTION
    description of what it does
  -p SIZE, --pp=SIZE
    unsigned long long

Arguments:
  ARGUMENT1
    always -1
  ARGUMENT2
    the ARGHument

Hey cool, this gave me an idea for a quick little refactoring. brb

desired format: ``` Help: command short description Usage: command [-fghij] [-o OPTION] [-p ANOTHER_OPTION] ARGUMENT1 ARGUMENT2 Flags: -f, --flag whatever it does -g, --glag whatever this is for -h, --hlag the purpose of this -i, --ilag how you would use that -j, --unexpected-example No. I am not explaining this option. Deal with it. Options: -o OPTION, --option=OPTION description of what it does -p SIZE, --pp=SIZE unsigned long long Arguments: ARGUMENT1 always -1 ARGUMENT2 the ARGHument ``` Hey cool, this gave me an idea for a quick little refactoring. brb

Refactoring done....

Refactoring done....

Implemented by @Shwoomple

Implemented by @Shwoomple
Sign in to join this conversation.
There is no content yet.