From c8b09d0d4ab73c88c6ae84718f0c890640dfbece Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 4 Nov 2021 21:21:09 +0000 Subject: CLI: Add 'cd' subcommand (#12584) * CLI: Add 'cd' subcommand Go to your qmk_firmware dir with ease. * Fix for Windows and do not run if already under QMK Home * Make flake8 happy * Fix prompt for Windows * Make flake8 happy once again * I'll get it right eventually * Apply suggestions from code review Co-authored-by: Ryan * Add subcommand to __init__.py and fixup after rebase * Update Windows code to use milc's run * Unify the subshell starting with os.execl * Exit with error msg when output is redirected to non-TTY. * Revert Windows-specific code Co-authored-by: Ryan --- docs/cli_commands.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs') diff --git a/docs/cli_commands.md b/docs/cli_commands.md index e498f3b22e..8f5117633f 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -118,6 +118,20 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] ``` +## `qmk cd` + +This command opens a new shell in your `qmk_firmware` directory. + +Note that if you are already somewhere within `QMK_HOME` (for example, the `keyboards/` folder), nothing will happen. + +To exit out into the parent shell, simply type `exit`. + +**Usage**: + +``` +qmk cd +``` + ## `qmk console` This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`. -- cgit v1.2.3