Intermediate Reading #man-pages #cli #git #curl

Reading Man Pages & CLI Help

5 exercises on decoding CLI synopses, flags, exit codes, and option descriptions from git --help, curl --help, and similar tools.

Key patterns for reading man pages and CLI help
  • [ ] = optional, <> = required placeholder, | = choose one
  • Exit code 0 = success; 128+n = killed by signal n (130 = Ctrl+C)
  • Short flags (-v) and long flags (--verbose) usually do the same thing
  • Check the description, not just the synopsis, for "Required" flags hidden in OPTIONS
0 / 5 completed
1 / 5
Read this excerpt from git --help:

usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects]
           [--bare] [--git-dir=<path>] [--work-tree=<path>]
           [--namespace=<name>] [--super-prefix=<path>]
           [--config-env=<name>=<envvar>] <command> [<args>]

In this synopsis, what do the square brackets [ ] around options signify?