summaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-03-04 04:10:10 +0000
committerQMK Bot <hello@qmk.fm>2021-03-04 04:10:10 +0000
commit54f6ff3bd53347648c182e097fd24420b8a712f8 (patch)
tree85c7a1c7f3881f3aedf8b67dfa6eb57e4c778e2a /lib/python
parentd3092ced99b5a529c6bde32d8f352cc40abd317d (diff)
parent6461087c865bc4af30ac8521af9db785afb662a0 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python')
-rwxr-xr-xlib/python/qmk/cli/generate/rules_mk.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py
index c21ab50906..15917987b9 100755
--- a/lib/python/qmk/cli/generate/rules_mk.py
+++ b/lib/python/qmk/cli/generate/rules_mk.py
@@ -36,6 +36,7 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict):
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
+@cli.argument('-e', '--escape', arg_only=True, action='store_true', help="Escape spaces in quiet mode")
@cli.argument('-kb', '--keyboard', help='Keyboard to generate config.h for.')
@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True)
@automagic_keyboard
@@ -83,7 +84,10 @@ def generate_rules_mk(cli):
cli.args.output.write_text(rules_mk)
if cli.args.quiet:
- print(cli.args.output)
+ if cli.args.escape:
+ print(cli.args.output.as_posix().replace(' ', '\\ '))
+ else:
+ print(cli.args.output)
else:
cli.log.info('Wrote rules.mk to %s.', cli.args.output)