Browse Source

Use newer mkusage syntax and usage() convention

Alois Mahdal 6 years ago
parent
commit
12b4849ff9
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      bin/mkx

+ 2
- 2
bin/mkx View File

129
             echo 'shellfu import pretty'
129
             echo 'shellfu import pretty'
130
             echo ''
130
             echo ''
131
             echo 'usage() {'
131
             echo 'usage() {'
132
-            echo '    mkusage "arg..."'
132
+            echo '    mkusage "$@" "[-d] [-v] ARG..."'
133
             echo '}'
133
             echo '}'
134
             echo ''
134
             echo ''
135
             echo 'main() {'
135
             echo 'main() {'
136
             echo '    while true; do case $1 in'
136
             echo '    while true; do case $1 in'
137
             echo '        -d) PRETTY_DEBUG=true;   shift ;;'
137
             echo '        -d) PRETTY_DEBUG=true;   shift ;;'
138
             echo '        -v) PRETTY_VERBOSE=true; shift ;;'
138
             echo '        -v) PRETTY_VERBOSE=true; shift ;;'
139
-            echo '        -*) usage ;;'
139
+            echo '        -*) usage -w "unknown argument: $1" ;;'
140
             echo '        *)  break ;;'
140
             echo '        *)  break ;;'
141
             echo '    esac done'
141
             echo '    esac done'
142
             echo '}'
142
             echo '}'