|
11 | 11 | - [Use your defined Commands from Status Bar](#use-your-defined-commands-from-status-bar) |
12 | 12 | - [Use keyboard shortcut for specific defined commands](#use-keyboard-shortcut-for-specific-defined-commands) |
13 | 13 | - [Use a different shell](#use-a-different-shell) |
14 | | -- [Latest Development Build](#latest-development-build) |
15 | 14 | - [Contributing](#contributing) |
16 | 15 |
|
17 | 16 | ## What is Script Runner |
@@ -73,19 +72,21 @@ Sample command definition: |
73 | 72 | } |
74 | 73 | ``` |
75 | 74 |
|
76 | | -| Name | Description | Required | Type | |
77 | | -| ------------------- | ----------------------------------------------------------------------------------- | -------- | ------- | |
78 | | -| `identifier` | Identifier used to do key binding. Use alphanumerical and hyphen/underscore only. | yes | string | |
79 | | -| `description` | Description of the command. | yes | string | |
80 | | -| `command` | Command to execute (with variables). | yes | string | |
81 | | -| `working_directory` | The working directory in which to execute the script. | | string | |
82 | | -| `form` | A list of questions to ask in order to obtain values for variables. | | array | |
83 | | -| `variable` | The variable name. | | string | |
84 | | -| `question` | The question to ask the user. | | |
85 | | -| `password` | Input is a password. Default is false. Suggestion: use also show_in_console: false | | boolean | |
86 | | -| `default` | The default value to put in the field. Only for text inputs. | | string | |
87 | | -| `options` | List of options (string) | | array | |
88 | | -| `variables` | List of variables (string) | | array | |
| 75 | +| Name | Description | Required | Type | |
| 76 | +| ---------------------- | ------------------------------------------------------------------------------------------------------ | -------- | ------- | |
| 77 | +| `identifier` | Identifier used to do key binding. Use alphanumerical and hyphen/underscore only. | yes | string | |
| 78 | +| `description` | Description of the command. | yes | string | |
| 79 | +| `command` | Command to execute (with variables). | yes | string | |
| 80 | +| `working_directory` | The working directory in which to execute the script. | | string | |
| 81 | +| `form` | A list of questions to ask in order to obtain values for variables. | | array | |
| 82 | +| `variable` | The variable name. | | string | |
| 83 | +| `question` | The question to ask the user. | | string | |
| 84 | +| `password` | Input is a password. Default is false. Suggestion: use also show_in_console: false | | boolean | |
| 85 | +| `default` | The default value to put in the field. Only for text inputs. | | string | |
| 86 | +| `defaultValuePath` | Overrides the default value with the current file path. Empty if no file open. password option ignored | | boolean | |
| 87 | +| `defaultValueFilename` | Overrides the default value with the current filename. Empty if no file open. password option ignored | | boolean | |
| 88 | +| `options` | List of options (string) | | array | |
| 89 | +| `variables` | List of variables (string) | | array | |
89 | 90 |
|
90 | 91 | ## Full Configuration Sample |
91 | 92 |
|
@@ -127,6 +128,19 @@ Sample command definition: |
127 | 128 | "default": "Test 1" |
128 | 129 | } |
129 | 130 | ] |
| 131 | + }, |
| 132 | + { |
| 133 | + "identifier": "filepath1", |
| 134 | + "description": "Filepath", |
| 135 | + "command": "echo $path ", |
| 136 | + "working_directory": "$tmp", |
| 137 | + "form": [ |
| 138 | + { |
| 139 | + "variable": "$path", |
| 140 | + "question": "What is the path", |
| 141 | + "defaultValuePath": true |
| 142 | + } |
| 143 | + ] |
130 | 144 | } |
131 | 145 | ], |
132 | 146 | "variables": { |
|
0 commit comments