diff options
| author | Ryan <fauxpark@gmail.com> | 2024-11-21 22:57:36 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-21 22:57:36 +1100 |
| commit | 65a8a5ff69289a5cb8fce6555b774573e4452a79 (patch) | |
| tree | 24d26aceb9f86e54b6e2cc110a8672f334f7182a /docs/cli_commands.md | |
| parent | c7a04bd9305c337e9190d5ebdd368c4af49adc43 (diff) | |
`qmk find`: expand operator support (#24468)
Diffstat (limited to 'docs/cli_commands.md')
| -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 | |||
| 153 | 153 | ||
| 154 | 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. | 154 | 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. |
| 155 | 155 | ||
| 156 | For example, one could search for all keyboards using STM32F411: | 156 | For example, one could search for all keyboards powered by the STM32F411 microcontroller: |
| 157 | 157 | ||
| 158 | ``` | 158 | ``` |
| 159 | qmk find -f 'processor=STM32F411' | 159 | qmk find -f 'processor==STM32F411' |
| 160 | ``` | 160 | ``` |
| 161 | 161 | ||
| 162 | ...and one can further constrain the list to keyboards using STM32F411 as well as rgb_matrix support: | 162 | The list can be further constrained by passing additional filter expressions: |
| 163 | 163 | ||
| 164 | ``` | 164 | ``` |
| 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: | 168 | The following filter expressions are supported: |
| 169 | 169 | ||
| 170 | - `key == value`: Match targets where `key` is equal to `value`. May include wildcards such as `*` and `?`. | ||
| 171 | - `key != value`: Match targets where `key` is not `value`. May include wildcards such as `*` and `?`. | ||
| 172 | - `key < value`: Match targets where `key` is a number less than `value`. | ||
| 173 | - `key > value`: Match targets where `key` is a number greater than `value`. | ||
| 174 | - `key <= value`: Match targets where `key` is a number less than or equal to `value`. | ||
| 175 | - `key >= value`: Match targets where `key` is a number greater than or equal to `value`. | ||
| 170 | - `exists(key)`: Match targets where `key` is present. | 176 | - `exists(key)`: Match targets where `key` is present. |
| 171 | - `absent(key)`: Match targets where `key` is not present. | 177 | - `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. | 178 | - `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: | |||
| 175 | You can also list arbitrary values for each matched target with `--print`: | 181 | You can also list arbitrary values for each matched target with `--print`: |
| 176 | 182 | ||
| 177 | ``` | 183 | ``` |
| 178 | qmk find -f 'processor=STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix' | 184 | qmk find -f 'processor==STM32F411' -p 'keyboard_name' -p 'features.rgb_matrix' |
| 179 | ``` | 185 | ``` |
| 180 | 186 | ||
| 181 | **Usage**: | 187 | **Usage**: |
