diff options
author | Ryan <fauxpark@gmail.com> | 2023-05-20 22:14:43 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 22:14:43 +1000 |
commit | 102c42b14bc79a178d16ae5217d739490a312ea4 (patch) | |
tree | 89db38db0fd565ecd27b613d071479cc00c5bf05 /docs | |
parent | b93f05dc35e911a5c5f758722545d96c66be88c6 (diff) |
`qmk find`: usability improvements (#20440)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/cli_commands.md | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md index d759c9c35a..79fd9de575 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -165,16 +165,31 @@ qmk find -f 'processor=STM32F411' qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true' ``` +The following filter expressions are also supported: + + - `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. + - `length(key, value)`: Match targets where the length of `key` is `value`. Can be used for strings, arrays and objects. + +You can also list arbitrary values for each matched target with `--print`: + +``` +qmk find -f 'processor=STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix' +``` + **Usage**: ``` -qmk find [-h] [-km KEYMAP] [-f FILTER] +qmk find [-h] [-km KEYMAP] [-p PRINT] [-f FILTER] options: -km KEYMAP, --keymap KEYMAP The keymap name to build. Default is 'default'. + -p PRINT, --print PRINT + For each matched target, print the value of the supplied info.json key. May be passed multiple times. -f FILTER, --filter FILTER - Filter the list of keyboards based on the supplied value in rules.mk. Matches info.json structure, and accepts the formats 'features.rgblight=true' or 'exists(matrix_pins.direct)'. May be passed multiple times, all filters need to match. Value may include wildcards such as '*' and '?'. + Filter the list of keyboards based on their info.json data. Accepts the formats key=value, function(key), or function(key,value), eg. 'features.rgblight=true'. Valid functions are 'absent', 'contains', 'exists' and 'length'. May be passed multiple times; all filters need to match. Value may include wildcards such as '*' and '?'. ``` ## `qmk console` |