Display help text when passed no options
dAnjou opened this issue Β· comments
Max Ludwig commented
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/