diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-12-17 00:19:28 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-12-17 00:19:28 -0500 |
commit | 1f79c681bbaab91133ee9343690ee563099d0bf0 (patch) | |
tree | b89238cb18fdb4964f8bb62a835adc1b63827416 /lddtree.py | |
parent | seccomp: mark arrays const+static (diff) | |
download | pax-utils-1f79c681bbaab91133ee9343690ee563099d0bf0.tar.gz pax-utils-1f79c681bbaab91133ee9343690ee563099d0bf0.tar.bz2 pax-utils-1f79c681bbaab91133ee9343690ee563099d0bf0.zip |
lddtree: add argcomplete support if available
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lddtree.py')
-rwxr-xr-x | lddtree.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,4 +1,5 @@ #!/usr/bin/env python +# PYTHON_ARGCOMPLETE_OK # Copyright 2012-2014 Gentoo Foundation # Copyright 2012-2014 Mike Frysinger <vapier@gentoo.org> # Copyright 2012-2014 The Chromium OS Authors @@ -50,6 +51,11 @@ import sys assert sys.version_info >= (3, 6), f'Python 3.6+ required, but found {sys.version}' +try: + import argcomplete +except ImportError: + argcomplete = None + from elftools.elf.elffile import ELFFile from elftools.common import exceptions @@ -739,6 +745,8 @@ def GetParser(): action='store_true', default=False, help='Copy over plain (non-ELF) files instead of warn+ignore') + if argcomplete is not None: + argcomplete.autocomplete(parser) return parser |