nandilugio / typetrain

Command line tool to practice touch typing.
0 stars 0 forks source link

argparse help not being helpful when no args #1

Open nandilugio opened 3 months ago

nandilugio commented 3 months ago
❯ python main.py
usage: typetrain [-h] [--skip SKIP] {serials,file,random-file} ...
typetrain: error: the following arguments are required: exercise_type

❯ python main.py h
usage: typetrain [-h] [--skip SKIP] {serials,file,random-file} ...
typetrain: error: argument exercise_type: invalid choice: 'h' (choose from 'serials', 'file', 'random-file')

❯ python main.py -h
usage: typetrain [-h] [--skip SKIP] {serials,file,random-file} ...

Practice some typing with the TypeTrain!

options:
  -h, --help            show this help message and exit
  --skip SKIP           skip the first N paragraphs

exercise types:
  {serials,file,random-file}
    serials             practice typing random serial numbers
    file                practice typing the contents of a file
    random-file         practice typing random paragraphs in a file
nandilugio commented 3 months ago

code at 70db555