Skip to content

make blisp help Usage message consistent #20

@River-Mochi

Description

@River-Mochi

Enhance the help messages for Blisp if someone types the incorrect command or spelling error.
This is somewhat related to the PR I submitted today. I corrected the readme page, but it would be nice to have a correction on the CLI help message.

Background:

  • syntax error in main Readme instructions I corrected today. If flag --chip is used it needs to be --chip=bl70x with the "="
  • does not work: blisp write --chip bl70x --reset name_of_firmware.bin
  • if "=" is not desired then "-c bl70x" could be used instead.

Either of these work for windows powershell:
-c, --chip=<chip_type> Chip Type

I noticed in using Blisp today the following:
If you type the flag incorrectly then it gives you one set of instructions. but if you mispell a word, then it gives you different instructions (see screenshot)
"Usage:" message should be same for both mistakes so user gets consistent help information.
It would be nice if both errors had a combination of the help lines, see my recommended update below.

Screenshot 2023-02-15 142827

Example below for improved message, just have this consistent message for the errors instead of two slightly different error messages for misspelled word versus a flag syntax error.

Usage:
  blisp write -c <chip_type> [-p <port_name>] [--reset] <input>
  blisp iot -c <chip_type> [-p <port_name>] [--reset] [-s <file>] [-l <int>]
  blisp [--help] [--version]
Writes firmware to SPI Flash
  -c, --chip=<chip_type>    Chip Type
  -p, --port=<port_name>  Name/Path to the Serial Port (empty for search)
  --reset                   Reset chip after write
  <input>                 Binary to write

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions