krieselreihe / litr

Litr (Language Independent Task Runner) lets you configure and then run any tasks you want for any language.
MIT License
8 stars 0 forks source link

Even better help #31

Open MartinHelmut opened 3 years ago

MartinHelmut commented 3 years ago

The current help is fine but could be better (the code as well, that is a mess, but contained 😅). Here an idea to better visualise nested commands with ASCII lines:

Litr - Language Independent Task Runner [version 1.0.0]
  Configuration file found under: /Users/martin/Projects/krieselreihe/litr/litr.toml

Usage: litr command [options]

Commands:
  test        [--target=<option>]
  ├ cpp       [--target=<option>]
  â”” java      [--target=<option>]
    │                    Some description for the java command.
    â”” nested  [--target=<option>]
  build       [--trace] [--target=<option>]
  run         [--target=<option>]
  update

Options:
  -h --help             Show this screen.
     --something        Lorem ipsum dolor sit amet, consectetur adipiscing elit,
                        sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
                        enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi.
  -r --trace            Activate tracing support.
  -t --target=<option>  Define the application build target.
                        Available options: "debug", "release", "profile", "trace"
                        Default option is: "debug"
MartinHelmut commented 3 years ago

Another point: Currently even if there are script errors the help is printed when requested. This maybe needs some love.