X-Git-Url: https://git.armaanb.net/?p=charsel.git;a=blobdiff_plain;f=charsel;fp=charsel;h=d7deba7801b2c9adc87817316c33e8e6b4488244;hp=6fb47d21309070a9936967e617215b7b19c56cb4;hb=59f9d833f1091dc4a42da9f1f745bd95672553ae;hpb=12d34a0140d97751e4ef991ef2b06d85d7dd1445 diff --git a/charsel b/charsel index 6fb47d2..d7deba7 100755 --- a/charsel +++ b/charsel @@ -106,10 +106,6 @@ function validity() { } # Look for arguments -if [ $# -eq 0 ]; then - usage - exit 3 -fi while getopts ":abcdhlLnv" arg do case ${arg} in @@ -156,6 +152,11 @@ do done shift $((OPTIND-1)) +if [ $# -eq 0 ]; then + echo "Please enter a valid charfile, or use charsel -h for help." + charsel -l + exit 3 +fi # Redefine charfile and check file validity CHARFILE="$CHARDIR/charfiles/$1" existence