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