usage() {
  cat <<EOF
"$(basename "$0")" - a simple script/command/function that does something

usage:
    $(basename "$0") [-1|--option1] [ -2|--option2 optionarg ] arg1 [arg2 ...]
         [fee] [dfsdfs] [sfsdfsf]

arguments:
    arg                Describe what arg does, should be, etc.

flags:
    -h, --help         Display this message
    -f, --force        Force overwriting an existing binary

options:
    -1|--option1       Describe what --option1 does.
    -2|--option2
      * option2choice1 Describe what optionarg does.
      * option2choice2
EOF
}

while test $# -gt 0; do
  case "$1" in
    -h|--help)
      usage
      exit 0
      ;;
    -1|--option1)
      optionarg="$2"
      # shift past argument and value
      shift
      shift
      ;;
    -2|--option2)
      optionarg="$2"
      # shift past argument and value
      shift
      shift
      ;;
    *)
      usage
      exit 1
      ;;
  esac
done
