mirror of
https://github.com/r4sas/PBinCLI
synced 2025-09-04 18:12:13 +00:00
Add CLI autocompletion using argcomplete
This commit is contained in:
parent
3f30828e1a
commit
b40f48295a
@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# PYTHON_ARGCOMPLETE_OK
|
||||||
import os, sys, argparse
|
import os, sys, argparse
|
||||||
from distutils.util import strtobool
|
from distutils.util import strtobool
|
||||||
|
|
||||||
|
import argcomplete
|
||||||
|
|
||||||
import pbincli.actions
|
import pbincli.actions
|
||||||
from pbincli.api import PrivateBin
|
from pbincli.api import PrivateBin
|
||||||
from pbincli.utils import PBinCLIException, PBinCLIError, validate_url_ending
|
from pbincli.utils import PBinCLIException, PBinCLIError, validate_url_ending
|
||||||
@ -124,6 +127,9 @@ def main():
|
|||||||
delete_parser.add_argument("-d", "--debug", default=False, action="store_true", help="Enable debug output")
|
delete_parser.add_argument("-d", "--debug", default=False, action="store_true", help="Enable debug output")
|
||||||
delete_parser.set_defaults(func=pbincli.actions.delete)
|
delete_parser.set_defaults(func=pbincli.actions.delete)
|
||||||
|
|
||||||
|
# Add argcomplete trigger
|
||||||
|
argcomplete.autocomplete(parser)
|
||||||
|
|
||||||
# parse arguments
|
# parse arguments
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -2,3 +2,4 @@ pycryptodome
|
|||||||
sjcl
|
sjcl
|
||||||
base58
|
base58
|
||||||
requests
|
requests
|
||||||
|
argcomplete
|
||||||
|
Loading…
x
Reference in New Issue
Block a user