fix invocation without subcommands to call usage function and exit 1 explicitlly
[monkeysphere.git] / src / monkeysphere
index f21ca7c3603d85e1d0cfa432b957c203f1db6509..36ecf9335b7b5732ad2e4cf266e112bd3ea9f117 100755 (executable)
@@ -219,7 +219,7 @@ export LOG_PREFIX
 
 # get subcommand
 COMMAND="$1"
-[ "$COMMAND" ] || $PGRM help
+[ "$COMMAND" ] || (usage; exit 1)
 shift
 
 case $COMMAND in
@@ -275,11 +275,11 @@ case $COMMAND in
        keys_from_userid "$@"
        ;;
 
-    'version'|'v')
+    'version'|'--version'|'v')
        version
        ;;
 
-    '--help'|'help'|'-h'|'h'|'?')
+    'help'|'--help'|'-h'|'h'|'?')
         usage
         ;;