Add shell completion scripts

This commit is contained in:
Michal Sojka 2024-10-01 12:22:03 +02:00
parent 8528f3558f
commit 0fd819b4a2
2 changed files with 16 additions and 2 deletions

View file

@ -1,9 +1,10 @@
#!/usr/bin/env python3
# PYTHON_ARGCOMPLETE_OK
# Copyright 2019-2024 Ben Wolsieffer <benwolsieffer@gmail.com>
# Copyright 2024 Michal Sojka <michal.sojka@cvut.cz>
import argparse
import argcomplete, argparse
import difflib
import io
import itertools
@ -319,6 +320,7 @@ def ros2nix(args):
"--license", help="License of the generated Nix expressions, e.g. 'BSD'"
)
argcomplete.autocomplete(parser)
args = parser.parse_args()
if args.output_dir is None and (args.output_as_nix_pkg_name or args.output_as_ros_pkg_name):