robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
122 stars 12 forks source link

update help options to match the [options] text in listed commands #28

Closed lightaffaire closed 1 year ago

lightaffaire commented 1 year ago

Options: area of help should be expanded to list:

--caption --footer

robvanderleek commented 1 year ago

Hi @lightaffaire

Options are expanded in the help message of specific commands, for example:

$ npx mudslide@latest send --help
Usage: mudslide send [options] <recipient> <message>

Send message

Options:
  -b, --button <text>  Button text (repeatable option) (default: [])
  --footer <text>      Footer text
  -h, --help           display help for command

Does this answer your question?

lightaffaire commented 1 year ago

now you explain it here i can understand but this will be a support nightmare going forwards. A suggestion:

Add 'mudslide@latest command --help' to basic help text and also list the commands before the options... also the --button text needs more explanation:

Usage: Usage: mudslide [options] [command]

Commands: login Login to WhatsApp logout Logout from WhatsApp me Show current user details groups List all your groups send [options] Send message send-image [options] Send image file send-file [options] Send file send-location Send location add-to-group Add group participant remove-from-group Remove group participant help [command] display help for command

Options: -V, --version output the version number -c, --cache Override cache folder --proxy Use HTTP/HTTPS proxy -h, --help display help for command

Examples: mudslide@latest command --help

create-issue-branch[bot] commented 1 year ago

Branch issue-28-update_help_options_to_match_the_options_text_in_listed_commands created!

robvanderleek commented 1 year ago

Hi @lightaffaire

The options in the global help are global options, so it's logical to have them before the commands (also, the order is not easy to change as it's enforced by the CLI library I'm using).

I've added some example command at the end of the global help, as you suggested, thanks!

KR, Rob