]> git.armaanb.net Git - charsel.git/blobdiff - charsel
minor behavior change when no arguments are passed
[charsel.git] / charsel
diff --git a/charsel b/charsel
index 6fb47d21309070a9936967e617215b7b19c56cb4..d7deba7801b2c9adc87817316c33e8e6b4488244 100755 (executable)
--- 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