Show More
@@ -1,6 +1,6 b'' | |||||
1 | import sys, os, getopt |
|
1 | import sys, os, getopt | |
2 |
|
2 | |||
3 | def fancyopts(args, options, state, syntax=''): |
|
3 | def fancyopts(args, options, state, syntax='', minlen = 0): | |
4 | long=[] |
|
4 | long=[] | |
5 | short='' |
|
5 | short='' | |
6 | map={} |
|
6 | map={} | |
@@ -18,7 +18,7 b' def fancyopts(args, options, state, synt' | |||||
18 | if c: print ' %s' % c |
|
18 | if c: print ' %s' % c | |
19 | sys.exit(0) |
|
19 | sys.exit(0) | |
20 |
|
20 | |||
21 |
if len(args) |
|
21 | if len(args) < minlen: | |
22 | help(state, None, args) |
|
22 | help(state, None, args) | |
23 |
|
23 | |||
24 | options=[('h', 'help', help, 'Show usage info')] + options |
|
24 | options=[('h', 'help', help, 'Show usage info')] + options |
General Comments 0
You need to be logged in to leave comments.
Login now