quickbench icon indicating copy to clipboard operation
quickbench copied to clipboard

command line help should be clearer

Open simonmichael opened this issue 8 years ago • 0 comments

I found this a bit hard to relearn quickly:

$ quickbench -h
quickbench 1.0
Run some test commands, possibly with different executables, once or more
and show their best execution times.
Commands are specified as one or more quote-enclosed arguments,
and/or one per line in CMDSFILE; or read from a default file [./bench.sh].
With -w, commands' first words are replaced with a new executable
(or multiple comma-separated executables, showing times for all).
Note: tests executable files only, not shell builtins; options must precede args.

Usage:
  quickbench [options] [<cmd>...]

Options:
  -f, --file CMDSFILE   file containing commands, one per line (- for stdin)
  -w, --with EXE[,...]  replace first word of commands with these executables
  -n, --iterations=N    run each test this many times [default: 1]
  -N, --cycles=N        run the whole suite this many times [default: 1]
  -p, --precision=N     show times with this many decimal places [default: 2]
  -v, --verbose         show commands being run
  -V, --more-verbose    show command output
      --debug           show debug output for this program
  -h, --help            show this help

This failed and the error message was unhelpful:

$ quickbench hledger print -f examples/10000x1000x10.journal 
user error (option "-f" should appear before argument "hledger" or is unknown)

The whole commands should be quoted:

$ quickbench 'hledger print -f examples/10000x1000x10.journal'

The help should make the usage clearer, and show it first.

simonmichael avatar Jan 12 '17 20:01 simonmichael