diff --git a/avds b/avds index 0a914e5..0685a4f 100755 --- a/avds +++ b/avds @@ -1,7 +1,7 @@ #!/bin/bash USAGE=" -USAGE: avds [] [] +USAGE: avds [] [] mod_list A comma or space separated list of modules to request that @@ -19,6 +19,12 @@ USAGE: avds [] [] EXAMPLES: + Any of these will display this help message. + + avds -h + avds -help + avds --help + If there are volume and backlight modules named 'vol' and 'bl' that update the volume and backlight statuses, send a requst to update both of those statuses immediately. @@ -52,6 +58,14 @@ if [[ "$#" -lt 1 || "$#" -gt 3 ]]; then fi IFS=', ' read -r -a mods <<< "$1" + +# Check if the user needs help +# shellcheck disable=SC2128 +if [[ "${mods}" =~ ^(-h|-(-)?help)$ ]]; then + printf '%s' "${USAGE}" 1>&2 + exit 0 +fi + when="${2:-0}" repeat="$3"