-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
featuresgood first issueEasy enough to contribute without much contextEasy enough to contribute without much contexthelp wanted
Description
Add -h and -V options
Basic getopts version:
#-----------------------------------------------------------------------
# Handle command line arguments
#-----------------------------------------------------------------------
while getopts ":hV" opt
do
# shellcheck disable=SC2214
case "${opt}" in
h|help ) _usage; exit 0 ;;
V|version ) _version; exit 0 ;;
\? ) printf '\nInvalid option: %s\n\n' "${OPTARG}"
_usage; exit 2 ;;
esac # --- end of case ---
done
shift $(( OPTIND-1 ))kdabir
Metadata
Metadata
Assignees
Labels
featuresgood first issueEasy enough to contribute without much contextEasy enough to contribute without much contexthelp wanted