qmk_firmware/lib/python/qmk/cli/list/keymaps.py
Zach White 299008be36
Add support for qmk_configurator style aliases (#11954)
* Add support for qmk_configurator style aliases

* add the keyboard aliases to the api data

* add support for a keyboard metadata file

* make flake8 happy
2021-03-24 09:26:38 -07:00

17 lines
550 B
Python

"""List the keymaps for a specific keyboard
"""
from milc import cli
import qmk.keymap
from qmk.decorators import automagic_keyboard
from qmk.keyboard import keyboard_folder
@cli.argument("-kb", "--keyboard", type=keyboard_folder, help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
@cli.subcommand("List the keymaps for a specific keyboard")
@automagic_keyboard
def list_keymaps(cli):
"""List the keymaps for a specific keyboard
"""
for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
print(name)