clop

Command-Line OPtions

Usage

clop ls                      # run 'ls --help' and count its options
clop ls cp mv                # several programs, plus a combined SUMMARY
clop --csv ls cp mv          # machine-readable CSV
clop --list ls               # also print the option names that were counted
ls --help | clop -           # read help text from standard input
clop -f captured-help.txt    # read help text from a saved file

Example output:

$ clop ls
ls
  version             9.1
  total options       60
  with aliases        25
  without aliases     35
  short option names  40
  long option names   45

What it reports

For each program, clop records the program's version and prints five numbers:

FieldMeaning
versionThe program's version, detected from program --version.
total optionsNumber of distinct options (one per option line in the help).
with aliasesOptions that have more than one spelling, e.g. -a / --all.
without aliasesOptions that have exactly one spelling.
short option namesNumber of short forms counted, e.g. -a, -1.
long option namesNumber of long forms counted, e.g. --all, --block-size.

Output formats

Labelling sources

When you read from a file or standard input, there is no program name or version for clop to discover. You can supply them yourself:

clop --name busybox -f busybox.help                 # label the source
clop --name tar --prog-version 1.35 -f tar.help     # also record a version