Add --debug option

This commit is contained in:
gardouille 2020-12-01 18:05:16 +01:00
parent 1c3370f68a
commit ca109f8499
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 8 additions and 1 deletions

View File

@ -21,7 +21,7 @@ readonly COLOR_DEBUG="${PURPLE}"
usage() { # {{{
cat <<- EOF
usage: $PROGNAME [--help] [--delay INT_DELAY_SECONDS] [INT_DELAY_SECONDS]
usage: $PROGNAME [--debug,--help] [--delay INT_DELAY_SECONDS] [INT_DELAY_SECONDS]
Try to get a screen capture with available tool:
1. Flameshot (see: https://github.com/flameshot-org/flameshot)
@ -36,6 +36,9 @@ EXAMPLES:
${PROGNAME} --delay 5
OPTIONS:
--debug
Enable debug messages.
-d,--delay INT_DELAY_SECONDS
Wait INT_DELAY_SECONDS before launching capture tool
@ -82,6 +85,10 @@ if [ ! "${NBARGS}" -eq "0" ]; then
while printf -- '%s' "${1}" | grep -q -E -- "^-+"; do
case "${1}" in
--debug ) ## Enable debug mode
## Enable DEBUG
DEBUG="0"
;;
-d|--delay ) ## Add a delay
## Enable DELAYED screenshot mode
DELAYED_MODE="0"