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

Display help text when passed no options #378

Closed
dAnjou opened this issue Jan 17, 2024 · 1 comment · Fixed by #380
Closed

Display help text when passed no options #378

dAnjou opened this issue Jan 17, 2024 · 1 comment · Fixed by #380

Comments

@dAnjou
Copy link

dAnjou commented Jan 17, 2024

Hi there, appreciating the effort you're putting into making this tool 🙏

I have a tiny suggestion though.

Steps to reproduce:

% oha --version
oha 1.1.0
% oha # execute without any options

Actual output:

error: the following required arguments were not provided:
  <URL>

Usage: oha [FLAGS] [OPTIONS] <url>

For more information, try '--help'.

Expected output:

warning: the following required arguments were not provided:
  <URL>

Usage: oha [FLAGS] [OPTIONS] <url>

Arguments:
  <URL>  Target URL.

Options:
  -n <N_REQUESTS>                     Number of requests to run. [default: 200]
  -c <N_CONNECTIONS>                  Number of connections to run concurrently. You may should increase limit to number of open files for larger `-c`. [default: 50]
  -p <N_HTTP2_PARALLEL>               Number of parallel requests to send on HTTP/2. `oha` will run c * p concurrent workers in total. [default: 1]
  -z <DURATION>                       Duration of application to send requests. If duration is specified, n is ignored.
                                      Examples: -z 10s -z 3m.

... truncating here, but I'd expect the full help output ...

References (I'm not the author):
https://clig.dev/#help
https://bvisness.me/you-cant/

@hatoo
Copy link
Owner

hatoo commented Jan 20, 2024

Thanks, your suggestion seems very good!
It will be implemented in #380.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants