Use argcomplete if available.

This commit is contained in:
Bastian Kleineidam 2013-02-27 06:50:34 +01:00
parent 09df20cd1f
commit cea32b80d2

4
dosage
View file

@ -40,6 +40,10 @@ def setupOptions():
parser.add_argument('--adult', action='store_true', default=False, help='confirms that you are old enough to view adult content') parser.add_argument('--adult', action='store_true', default=False, help='confirms that you are old enough to view adult content')
parser.add_argument('--multimatch', action='store_true', default=False, help='') parser.add_argument('--multimatch', action='store_true', default=False, help='')
parser.add_argument('comic', nargs='+', help='comic module name (including case insensitive substrings)') parser.add_argument('comic', nargs='+', help='comic module name (including case insensitive substrings)')
try:
import argcomplete
except:
argcomplete.autocomplete(parser)
return parser return parser