Skip to content

Commit f7bca8b

Browse files
committed
Add docs for dropdown arguments
1 parent 405f311 commit f7bca8b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

documentation/ARGUMENTS.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ Raycast allows you to set arguments for your script to enable you to do things l
55
Use `argument[1..3]` metadata to specify custom arguments that will be displayed as inputs in the search bar when the script is selected.
66

77
![Custom arguments](/images/screenshots/custom-arguments.png)
8-
The value of the argument metadata parameter should be valid json with these fields:
8+
The value of the argument metadata parameter should be valid json with these fields:
99
| Field | Description | Required | App Version |
1010
| ----- | ----------- | -------- | ----------- |
11-
| type | Input type. For now only "text" value available. || 1.2.0+ |
11+
| type | The argument type. We currently support `"text"`, `"password"` (for secure entry), and `"dropdown"`. When the type is `password`, entered text will be replaced with asterisks. Most common use case – passing passwords or secrets to commands. || 1.64.0+ |
1212
| placeholder | Placeholder for the input field. || 1.2.0+ |
13-
| optional | Set to `true` if you want to mark the argument as optional. When not provided, the argument is considered to be required (Raycast will not allow to execute the script if the argument input is empty) | | 1.3.0+ |
14-
| percentEncoded | Set to `true` if you want Raycast to perform percent encoding on the argument value before passing it to the script. Can be handy for scripts that pass the argument directly to URL query | | 1.4.0+ |
15-
| secure | When set to `true` entered text will be replaced with asterisks and won't be recorded by history. Most common use case – passing passwords or secrets to scripts. | | 1.18.0+ |
13+
| optional | Set to `true` if you want to mark the argument as optional. When not provided, the argument is considered to be required (Raycast will not allow executing the script if the argument input is empty) | | 1.3.0+ |
14+
| percentEncoded | Set to `true` if you want Raycast to perform percent-encoding on the argument value before passing it to the script. Can be handy for scripts that pass the argument directly to URL query | | 1.4.0+ |
15+
| data | An array of objects with `title` and `value` properties, e.g.: `[{"title": "Item 1", "value": "1"}]| ✅ when `type`is`dropdown`. |
16+
| ~~secure~~ | Deprecated in favor of `"type" = "password"` | | 1.18.0+ |
1617

1718
💡 **Maximum number of arguments:** 3 (if you have a use case that requires more, please let us know via feedback or in the [Slack community](https://www.raycast.com/community))
1819

0 commit comments

Comments
 (0)