diff --git a/bash/sources/12_shortcuts b/bash/sources/12_shortcuts index 16c69b7..f081cc4 100755 --- a/bash/sources/12_shortcuts +++ b/bash/sources/12_shortcuts @@ -19,14 +19,21 @@ function kres { } function pwgen { - local _LEN=$1 + local _LEN=$1 _TYPE=$2 case $_LEN in - ''|*[!0-9]*) + *[!0-9]*) echo "Enter a valid number" > /dev/stderr return 1 ;; + '') + echo "Usage: pwgen [LEN] [TYPE]" + return 1 + ;; esac - LC_ALL=C tr -dc '[:graph:]'