summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/cli/generate/compilation_database.py
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-04-09 16:42:12 +0000
committerQMK Bot <hello@qmk.fm>2023-04-09 16:42:12 +0000
commit6c172772dbe5f046d45c1c4398c48fa5b2d2681c (patch)
tree81cebe216811fae51022ad9ace88c975fda2e9a5 /lib/python/qmk/cli/generate/compilation_database.py
parentf5b74918837bacc5aaa98641428309380d591707 (diff)
parent6e0acf05482866ed0b092e5ca6cb19d96153ee3b (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk/cli/generate/compilation_database.py')
-rwxr-xr-xlib/python/qmk/cli/generate/compilation_database.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/generate/compilation_database.py b/lib/python/qmk/cli/generate/compilation_database.py
index 7ac0f740fe..5e1a18a69b 100755
--- a/lib/python/qmk/cli/generate/compilation_database.py
+++ b/lib/python/qmk/cli/generate/compilation_database.py
@@ -15,6 +15,8 @@ from milc import cli, MILC
from qmk.commands import create_make_command
from qmk.constants import QMK_FIRMWARE
from qmk.decorators import automagic_keyboard, automagic_keymap
+from qmk.keyboard import keyboard_completer, keyboard_folder
+from qmk.keymap import keymap_completer
@lru_cache(maxsize=10)
@@ -74,8 +76,8 @@ def parse_make_n(f: Iterator[str]) -> List[Dict[str, str]]:
return records
-@cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.')
-@cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Ignored when a configurator export is supplied.')
+@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard\'s name')
+@cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap\'s name')
@cli.subcommand('Create a compilation database.')
@automagic_keyboard
@automagic_keymap
@@ -104,7 +106,7 @@ def generate_compilation_database(cli: MILC) -> Union[bool, int]:
if not command:
cli.log.error('You must supply both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.')
- cli.echo('usage: qmk compiledb [-kb KEYBOARD] [-km KEYMAP]')
+ cli.echo('usage: qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]')
return False
# remove any environment variable overrides which could trip us up