add arcomplete support

This commit is contained in:
Roman Zeyde
2014-10-21 10:35:48 +03:00
parent 4248a0f08a
commit 6b483335e9
3 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import sys
if sys.version_info.major == 2:
_stdin = sys.stdin
@@ -8,6 +10,8 @@ else:
_stdout = sys.stdout.buffer
import argparse
import argcomplete
import logging
log = logging.getLogger('__name__')
@@ -104,6 +108,7 @@ def main():
output_type=FileType('wb')
)
argcomplete.autocomplete(p)
args = p.parse_args()
if args.verbose == 0:
level, format = 'INFO', '%(message)s'