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/cli_commands.md | |
| parent | b93f05dc35e911a5c5f758722545d96c66be88c6 (diff) | |
`qmk find`: usability improvements (#20440)
Diffstat (limited to 'docs/cli_commands.md')
| -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' | |||
| 165 | qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true' | 165 | qmk find -f 'processor=STM32F411' -f 'features.rgb_matrix=true' |
| 166 | ``` | 166 | ``` |
| 167 | 167 | ||
| 168 | The following filter expressions are also supported: | ||
| 169 | |||
| 170 | - `exists(key)`: Match targets where `key` is present. | ||
| 171 | - `absent(key)`: Match targets where `key` is not present. | ||
| 172 | - `contains(key, value)`: Match targets where `key` contains `value`. Can be used for strings, arrays and object keys. | ||
| 173 | - `length(key, value)`: Match targets where the length of `key` is `value`. Can be used for strings, arrays and objects. | ||
| 174 | |||
| 175 | You can also list arbitrary values for each matched target with `--print`: | ||
| 176 | |||
| 177 | ``` | ||
| 178 | qmk find -f 'processor=STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix' | ||
| 179 | ``` | ||
| 180 | |||
| 168 | **Usage**: | 181 | **Usage**: |
| 169 | 182 | ||
| 170 | ``` | 183 | ``` |
| 171 | qmk find [-h] [-km KEYMAP] [-f FILTER] | 184 | qmk find [-h] [-km KEYMAP] [-p PRINT] [-f FILTER] |
| 172 | 185 | ||
| 173 | options: | 186 | options: |
| 174 | -km KEYMAP, --keymap KEYMAP | 187 | -km KEYMAP, --keymap KEYMAP |
| 175 | The keymap name to build. Default is 'default'. | 188 | The keymap name to build. Default is 'default'. |
| 189 | -p PRINT, --print PRINT | ||
| 190 | For each matched target, print the value of the supplied info.json key. May be passed multiple times. | ||
| 176 | -f FILTER, --filter FILTER | 191 | -f FILTER, --filter FILTER |
| 177 | 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 '?'. | 192 | 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 '?'. |
| 178 | ``` | 193 | ``` |
| 179 | 194 | ||
| 180 | ## `qmk console` | 195 | ## `qmk console` |
