Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make blisp help Usage message consistent #20

Open
River-Mochi opened this issue Feb 15, 2023 · 6 comments
Open

make blisp help Usage message consistent #20

River-Mochi opened this issue Feb 15, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@River-Mochi
Copy link
Collaborator

River-Mochi commented Feb 15, 2023

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

@gamelaster
Copy link
Member

The thing is that this is fully controlled by argtable3 library :(

@robertlipe
Copy link
Collaborator

robertlipe commented Feb 17, 2023 via email

@robertlipe
Copy link
Collaborator

robertlipe commented Feb 17, 2023 via email

@River-Mochi
Copy link
Collaborator Author

River-Mochi commented Feb 19, 2023

I can sling that patch later in the day.

that would be nice if you could update the code to have help message be consistant for all mistakes. and give the user all the info possible.

I'm not sure where this is exactly in the code. could you give me a link to where this is? is it something where we can type in the help message we want?

@River-Mochi River-Mochi added enhancement New feature or request help wanted Extra attention is needed labels Mar 4, 2023
@River-Mochi
Copy link
Collaborator Author

@robertlipe have you attempted to change the help output messages in BLISP ? any progress on this?

@Ralim Ralim removed their assignment Apr 7, 2023
@robertlipe robertlipe self-assigned this Apr 8, 2023
@robertlipe
Copy link
Collaborator

I've begun an investigation (NTS: ~/tmp/blisp-notes) and I'm finding substantial disparities between what's accepted, what's displayed, and industry norms. I'm not typing it here at this time, but there are at least a few things we can do that will help improve usability, but I can't even make it work reliabily enough to root cause it right now.

Investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants