Skip to content

Instantly share code, notes, and snippets.

@r10r
Last active July 10, 2018 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r10r/c6c26fd725dc793bcac25938108b2bcf to your computer and use it in GitHub Desktop.
Save r10r/c6c26fd725dc793bcac25938108b2bcf to your computer and use it in GitHub Desktop.
Cmdline Best Practises

Help / Usage Syntax

Usage string format:

cmd_name [options] arg1_name [arg2_name]

  • List paths to config files and used environment variables.
  • Show links / hints for more detailed information.

Options

Use [options] to indicate where the options go Each option should be have:

  • a short description
  • a default value, if there is one
  • a list of possible values, if any

Arguments

  • arg_name for a required, singular arg
  • [arg_name] for an optional, singular arg
  • arg_name... for a required arg of which there can be many (this is rare)
  • [arg_name...] for an arg for which any number can be supplied

arg_name should be a descriptive, short name, in lower, snake case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment