Browse Source

Just pass args to mkusage(); no need for --wanted

We're scratching right ear with left hand...
Alois Mahdal 8 years ago
parent
commit
2f2d613e9a
1 changed files with 3 additions and 9 deletions
  1. 3
    9
      src/shellfu/saturnin.sh

+ 3
- 9
src/shellfu/saturnin.sh View File

142
     exit "$EXIT_OK"
142
     exit "$EXIT_OK"
143
 }
143
 }
144
 
144
 
145
-saturnin__help() {
146
-    saturnin__usage --wanted
147
-}
148
-
149
 saturnin__lssc() {
145
 saturnin__lssc() {
150
     #
146
     #
151
     # List subcommands
147
     # List subcommands
164
     while true; do case $1 in
160
     while true; do case $1 in
165
         -d|--debug)     export PRETTY_DEBUG=true;   shift ;;
161
         -d|--debug)     export PRETTY_DEBUG=true;   shift ;;
166
         -v|--verbose)   export PRETTY_VERBOSE=true; shift ;;
162
         -v|--verbose)   export PRETTY_VERBOSE=true; shift ;;
167
-        -h|--help)      saturnin__help;             exit  ;;
163
+        -h|--help)      saturnin__usage -e 0;       exit  ;;
168
         --version)      saturnin__version;          exit  ;;
164
         --version)      saturnin__version;          exit  ;;
169
         --version-semver) saturnin__get app-version ;;
165
         --version-semver) saturnin__get app-version ;;
170
         --saturnin-get-*) saturnin__get "$1"        ;;
166
         --saturnin-get-*) saturnin__get "$1"        ;;
251
 }
247
 }
252
 
248
 
253
 saturnin__usage() {
249
 saturnin__usage() {
254
-    local es_param      # exit-status related arguments
255
-    test "$1" == "--wanted" && es_param="-e 0"
256
-    #shellcheck disable=SC2086 disable=SC2046
257
-    mkusage $es_param                                       \
250
+    #shellcheck disable=SC2046
251
+    mkusage "$@"                                            \
258
             "[options] COMMAND [ARG...]"                    \
252
             "[options] COMMAND [ARG...]"                    \
259
         -o                                                  \
253
         -o                                                  \
260
             "-d, --debug    turn on debugging"              \
254
             "-d, --debug    turn on debugging"              \