diff --git a/requirements.txt b/requirements.txt index 16702c6..4afee62 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +argcomplete pyyaml pexpect requests diff --git a/src/nanosaur/main.py b/src/nanosaur/main.py index 580559a..cb9f2af 100644 --- a/src/nanosaur/main.py +++ b/src/nanosaur/main.py @@ -1,3 +1,4 @@ +# PYTHON_ARGCOMPLETE_OK # Copyright (C) 2024, Raffaello Bonghi # All rights reserved # Redistribution and use in source and binary forms, with or without @@ -24,6 +25,7 @@ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse +import argcomplete import sys import subprocess from jtop import jtop, JtopException @@ -150,6 +152,9 @@ def main(): 'control', help="Drive nanosaur") parser_control.set_defaults(func=control.control_keyboard) + # Enable autocomplete + argcomplete.autocomplete(parser) + # Parse the arguments args = parser.parse_args()