summaryrefslogtreecommitdiffstats
path: root/docs/cli_commands.md
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-05-29 06:17:24 +1000
committerNick Brassel <nick@tzarc.org>2023-05-29 06:17:24 +1000
commit5024370dd0b441e86ace3089193e84c5b050d892 (patch)
treeb661d5b154be987f9c3dba3a526b70e0b63f9fef /docs/cli_commands.md
parent16767e4d59c2334fcd2d5e6556a68d5ff60ffd7b (diff)
parent8b1d86eabf399e82af7738fb675b9c74195d0f98 (diff)
Merge branch 'develop'
Diffstat (limited to 'docs/cli_commands.md')
-rw-r--r--docs/cli_commands.md19
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`