|
@@ -942,13 +942,13 @@ option.parse() {
|
942
|
942
|
unset discardme
|
943
|
943
|
subcommand=${1}
|
944
|
944
|
if [[ -z $subcommand ]]; then
|
945
|
|
- subcommand="__default"
|
|
945
|
+ subcommand="__empty"
|
946
|
946
|
fi
|
947
|
947
|
|
948
|
948
|
if [[ -z ${(k)option_subcommands[$subcommand]} ]]; then
|
949
|
|
- _warning "There's no such command \"::1 subcommand::\"." $subcommand
|
950
|
|
- _failure "Please try -h for help."
|
951
|
|
- return 1
|
|
949
|
+ subcommand="__unknown:$subcommand"
|
|
950
|
+ # _warning "There's no such command \"::1 subcommand::\"." $subcommand
|
|
951
|
+ # _failure "Please try -h for help."
|
952
|
952
|
fi
|
953
|
953
|
argv=("${(@)oldstar}")
|
954
|
954
|
unset oldstar
|
|
@@ -981,7 +981,7 @@ option.parse() {
|
981
|
981
|
option_params+=$arg
|
982
|
982
|
done
|
983
|
983
|
# First parameter actually is the subcommand: delete it and shift
|
984
|
|
- [[ $subcommand != '__default' ]] && { option_params[1]=(); shift }
|
|
984
|
+ [[ $subcommand != '__empty' ]] && { option_params[1]=(); shift }
|
985
|
985
|
|
986
|
986
|
### End parsing command-specific options
|
987
|
987
|
|
|
@@ -998,7 +998,7 @@ option.parse() {
|
998
|
998
|
# help)
|
999
|
999
|
# print "TODO: help"
|
1000
|
1000
|
# ;;
|
1001
|
|
-# __default)
|
|
1001
|
+# __empty)
|
1002
|
1002
|
# zdump
|
1003
|
1003
|
# ;;
|
1004
|
1004
|
|