diff options
author | Ryan <[email protected]> | 2024-11-21 22:57:36 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-11-21 22:57:36 +1100 |
commit | 65a8a5ff69289a5cb8fce6555b774573e4452a79 (patch) | |
tree | 24d26aceb9f86e54b6e2cc110a8672f334f7182a /docs | |
parent | c7a04bd9305c337e9190d5ebdd368c4af49adc43 (diff) | |
download | qmk_firmware-65a8a5ff69289a5cb8fce6555b774573e4452a79.tar.gz qmk_firmware-65a8a5ff69289a5cb8fce6555b774573e4452a79.zip |
`qmk find`: expand operator support (#24468)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/cli_commands.md | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 7d74d8e617..4cd5ae98c3 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -153,20 +153,26 @@ qmk cd This command allows for searching through keyboard/keymap targets, filtering by specific criteria. `info.json` and `rules.mk` files contribute to the search data, as well as keymap configurations, and the results can be filtered using "dotty" syntax matching the overall `info.json` file format. -For example, one could search for all keyboards using STM32F411: +For example, one could search for all keyboards powered by the STM32F411 microcontroller: ``` -qmk find -f 'processor=STM32F411' +qmk find -f 'processor==STM32F411' ``` -...and one can further constrain the list to keyboards using STM32F411 as well as rgb_matrix support: +The list can be further constrained by passing additional filter expressions: ``` -qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true' +qmk find -f 'processor==STM32F411' -f 'features.rgb_matrix==true' ``` -The following filter expressions are also supported: +The following filter expressions are supported: + - `key == value`: Match targets where `key` is equal to `value`. May include wildcards such as `*` and `?`. + - `key != value`: Match targets where `key` is not `value`. May include wildcards such as `*` and `?`. + - `key < value`: Match targets where `key` is a number less than `value`. + - `key > value`: Match targets where `key` is a number greater than `value`. + - `key <= value`: Match targets where `key` is a number less than or equal to `value`. + - `key >= value`: Match targets where `key` is a number greater than or equal to `value`. - `exists(key)`: Match targets where `key` is present. - `absent(key)`: Match targets where `key` is not present. - `contains(key, value)`: Match targets where `key` contains `value`. Can be used for strings, arrays and object keys. @@ -175,7 +181,7 @@ The following filter expressions are also supported: You can also list arbitrary values for each matched target with `--print`: ``` -qmk find -f 'processor=STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix' +qmk find -f 'processor==STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix' ``` **Usage**: |