snippet_cli 0.3.6 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -15
- data/exe/snippet_cli +45 -11
- data/lib/snippet_cli/Espanso_Merged_Matchfile_Schema.json +889 -0
- data/lib/snippet_cli/banner.rb +16 -0
- data/lib/snippet_cli/commands/check.rb +49 -0
- data/lib/snippet_cli/commands/conflict.rb +75 -0
- data/lib/snippet_cli/commands/new.rb +16 -102
- data/lib/snippet_cli/commands/vars.rb +58 -0
- data/lib/snippet_cli/commands/version.rb +17 -0
- data/lib/snippet_cli/conflict_detector.rb +71 -0
- data/lib/snippet_cli/cursor_helper.rb +20 -0
- data/lib/snippet_cli/espanso_config.rb +26 -0
- data/lib/snippet_cli/file_helper.rb +16 -0
- data/lib/snippet_cli/file_validator.rb +33 -0
- data/lib/snippet_cli/file_writer.rb +12 -0
- data/lib/snippet_cli/form_field_parser.rb +13 -0
- data/lib/snippet_cli/global_vars_formatter.rb +63 -0
- data/lib/snippet_cli/global_vars_writer.rb +29 -0
- data/lib/snippet_cli/gum_theme.rb +39 -0
- data/lib/snippet_cli/hash_utils.rb +21 -0
- data/lib/snippet_cli/match_file_writer.rb +26 -0
- data/lib/snippet_cli/match_validator.rb +33 -0
- data/lib/snippet_cli/new_workflow.rb +98 -0
- data/lib/snippet_cli/replacement_text_collector.rb +55 -0
- data/lib/snippet_cli/replacement_validator.rb +35 -0
- data/lib/snippet_cli/replacement_wizard.rb +100 -0
- data/lib/snippet_cli/schema_validator.rb +27 -0
- data/lib/snippet_cli/snippet_builder.rb +133 -0
- data/lib/snippet_cli/string_helper.rb +11 -0
- data/lib/snippet_cli/table_formatter.rb +37 -0
- data/lib/snippet_cli/trigger_resolver.rb +67 -0
- data/lib/snippet_cli/ui.rb +90 -0
- data/lib/snippet_cli/var_builder/form_fields.rb +54 -0
- data/lib/snippet_cli/var_builder/name_collector.rb +69 -0
- data/lib/snippet_cli/var_builder/param_schema.rb +71 -0
- data/lib/snippet_cli/var_builder/params.rb +127 -0
- data/lib/snippet_cli/var_builder.rb +125 -0
- data/lib/snippet_cli/var_summary_renderer.rb +48 -0
- data/lib/snippet_cli/var_usage_checker.rb +48 -0
- data/lib/snippet_cli/var_yaml_renderer.rb +20 -0
- data/lib/snippet_cli/vars_block_renderer.rb +15 -0
- data/lib/snippet_cli/version.rb +3 -1
- data/lib/snippet_cli/wizard_context.rb +13 -0
- data/lib/snippet_cli/wizard_helpers/error_handler.rb +20 -0
- data/lib/snippet_cli/wizard_helpers/match_file_selector.rb +32 -0
- data/lib/snippet_cli/wizard_helpers/prompt_helpers.rb +57 -0
- data/lib/snippet_cli/wizard_helpers/validation_loop.rb +33 -0
- data/lib/snippet_cli/wizard_helpers.rb +8 -0
- data/lib/snippet_cli/yaml_line_resolver.rb +46 -0
- data/lib/snippet_cli/yaml_loader.rb +19 -0
- data/lib/snippet_cli/yaml_param_renderer.rb +33 -0
- data/lib/snippet_cli/yaml_scalar.rb +48 -0
- data/lib/snippet_cli.rb +44 -1
- metadata +134 -101
- data/.gitignore +0 -11
- data/.rspec +0 -3
- data/.travis.yml +0 -9
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -17
- data/Rakefile +0 -10
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/Setup.rb +0 -76
- data/lib/banner.rb +0 -16
- data/lib/snippet_cli/cli.rb +0 -62
- data/lib/snippet_cli/command.rb +0 -121
- data/lib/snippet_cli/commands/info.md +0 -20
- data/lib/snippet_cli/commands/info.rb +0 -36
- data/lib/snippet_cli/commands/setup.rb +0 -108
- data/lib/snippet_cli/templates/.gitkeep +0 -1
- data/lib/snippet_cli/templates/config/.gitkeep +0 -1
- data/lib/snippet_cli/templates/create/.gitkeep +0 -1
- data/lib/snippet_cli/templates/info/.gitkeep +0 -1
- data/lib/snippet_cli/templates/setup/.gitkeep +0 -1
- data/lib/snippet_generator.rb +0 -85
- data/snippet_cli-0.1.0.gem +0 -0
- data/snippet_cli-0.1.1.gem +0 -0
- data/snippet_cli-0.1.2.gem +0 -0
- data/snippet_cli-0.1.3.gem +0 -0
- data/snippet_cli-0.1.4.gem +0 -0
- data/snippet_cli-0.1.5.gem +0 -0
- data/snippet_cli-0.1.6.gem +0 -0
- data/snippet_cli-0.1.7.gem +0 -0
- data/snippet_cli-0.1.8.gem +0 -0
- data/snippet_cli-0.1.9.gem +0 -0
- data/snippet_cli-0.2.0.gem +0 -0
- data/snippet_cli-0.2.1.gem +0 -0
- data/snippet_cli-0.2.2.gem +0 -0
- data/snippet_cli-0.2.3.gem +0 -0
- data/snippet_cli-0.2.4.gem +0 -0
- data/snippet_cli-0.2.6.gem +0 -0
- data/snippet_cli-0.2.7.gem +0 -0
- data/snippet_cli-0.2.8.gem +0 -0
- data/snippet_cli.gemspec +0 -37
|
@@ -0,0 +1,889 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://ajm.codes/Espanso_Merged_Matchfile_Schema.json",
|
|
4
|
+
"title": "Espanso Match File Schema (Merged)",
|
|
5
|
+
"description": "Unified validation schema for Espanso match files (.yml). Combines the official Espanso match schema (structural correctness, full property coverage, IANA timezone and BCP47 locale enums) with custom extension constraints and prose descriptions with doc links. Used by `snippet validate`. Conflict resolutions: trigger requirement enforced (custom wins); html/markdown added as valid replacements (official wins); vars use per-type oneOf branches (official wins); descriptions/links from custom. See https://espanso.org/docs/",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["matches"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "URI reference to the JSON schema used to validate this file. Optional but useful for editor support."
|
|
13
|
+
},
|
|
14
|
+
"matches": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"description": "Array of match entries. Each entry defines a trigger and its replacement. See https://espanso.org/docs/matches/basics/",
|
|
17
|
+
"additionalItems": false,
|
|
18
|
+
"items": { "$ref": "#/definitions/match" }
|
|
19
|
+
},
|
|
20
|
+
"global_vars": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "Variables available to all matches in this file. Defined once and usable across any match via {{var_name}}. See https://espanso.org/docs/matches/basics/#global-variables",
|
|
23
|
+
"items": { "$ref": "#/definitions/var" }
|
|
24
|
+
},
|
|
25
|
+
"imports": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"description": "Import matches from other files outside the standard Espanso config folder. See https://espanso.org/docs/matches/organizing-matches/#imports",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"uniqueItems": true,
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Path to a YAML Espanso match file or package."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"extra_includes": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"description": "Load matches from files that extend existing file functionality. Useful for per-app configuration. See https://espanso.org/docs/matches/organizing-matches/#using-imports-to-group-private-match-sets-advanced",
|
|
38
|
+
"minItems": 1,
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Path to a YAML Espanso config file or package."
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"extra_excludes": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"description": "Disable configuration files or packages for a specific application. See https://espanso.org/docs/configuration/include-and-exclude/#excluding-a-package",
|
|
47
|
+
"minItems": 1,
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Path to a YAML Espanso config file or package."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"anchors": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"description": "Top-level YAML anchor definitions reusable across matches via aliases (*anchor_name). See https://espanso.org/docs/matches/extensions/#anchors-and-aliases",
|
|
56
|
+
"items": { "$ref": "#/definitions/anchor" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"definitions": {
|
|
60
|
+
"match": {
|
|
61
|
+
"description": "A single match entry: a trigger and its replacement. See https://espanso.org/docs/matches/basics/",
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"uppercase_style": ["propagate_case"]
|
|
66
|
+
},
|
|
67
|
+
"allOf": [
|
|
68
|
+
{
|
|
69
|
+
"oneOf": [
|
|
70
|
+
{ "required": ["trigger"] },
|
|
71
|
+
{ "required": ["triggers"] },
|
|
72
|
+
{ "required": ["regex"] }
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{ "required": ["replace"] },
|
|
78
|
+
{ "required": ["form"] },
|
|
79
|
+
{ "required": ["image_path"] },
|
|
80
|
+
{ "required": ["html"] },
|
|
81
|
+
{ "required": ["markdown"] }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"if": {
|
|
86
|
+
"required": ["image_path"],
|
|
87
|
+
"properties": { "image_path": { "type": "string" } }
|
|
88
|
+
},
|
|
89
|
+
"then": { "not": { "required": ["propagate_case"] } }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"if": {
|
|
93
|
+
"required": ["image_path"],
|
|
94
|
+
"properties": { "image_path": { "type": "string" } }
|
|
95
|
+
},
|
|
96
|
+
"then": { "not": { "required": ["word"] } }
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"if": {
|
|
100
|
+
"required": ["image_path"],
|
|
101
|
+
"properties": { "image_path": { "type": "string" } }
|
|
102
|
+
},
|
|
103
|
+
"then": { "not": { "required": ["vars"] } }
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"trigger": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"description": "The text you type to trigger this expansion. Use `trigger` for a single trigger string. See https://espanso.org/docs/matches/basics/"
|
|
111
|
+
},
|
|
112
|
+
"triggers": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"items": { "type": "string", "minLength": 1 },
|
|
116
|
+
"description": "An array of trigger strings, any of which will expand this match. Use when you want multiple aliases for the same replacement. See https://espanso.org/docs/matches/basics/#multiple-triggers"
|
|
117
|
+
},
|
|
118
|
+
"regex": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "A regular expression that, when matched, triggers this expansion. Follows Espanso's regex syntax. See https://espanso.org/docs/matches/regex-triggers/"
|
|
121
|
+
},
|
|
122
|
+
"replace": {
|
|
123
|
+
"type": ["string", "null"],
|
|
124
|
+
"description": "The static text replacement. The trigger is replaced with this string. Use {{var_name}} to include variable output. See https://espanso.org/docs/matches/basics/#static-matches"
|
|
125
|
+
},
|
|
126
|
+
"form": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "A form layout string rendered as a dialog the user fills out before expansion. Fields are denoted with [[field_name]] syntax. See https://espanso.org/docs/matches/forms/"
|
|
129
|
+
},
|
|
130
|
+
"form_fields": {
|
|
131
|
+
"$ref": "#/definitions/form_field_definition",
|
|
132
|
+
"description": "Configuration for individual form fields referenced in the `form` layout. Keys must match [[field_name]] entries in the layout. See https://espanso.org/docs/matches/forms/#controls"
|
|
133
|
+
},
|
|
134
|
+
"image_path": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Path to an image file. The trigger is replaced with the image rather than text. See https://espanso.org/docs/matches/basics/#image-matches"
|
|
137
|
+
},
|
|
138
|
+
"html": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "An HTML string replacement, outputting rich text when the app supports it. See https://espanso.org/docs/matches/basics/#rich-text"
|
|
141
|
+
},
|
|
142
|
+
"markdown": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "A Markdown string replacement, outputting rich text. An alternative to `html`. See https://espanso.org/docs/matches/basics/#rich-text"
|
|
145
|
+
},
|
|
146
|
+
"paragraph": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"description": "When true, prevents Espanso from injecting a trailing newline after a markdown replacement. See https://espanso.org/docs/matches/basics/#rich-text"
|
|
149
|
+
},
|
|
150
|
+
"vars": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"description": "Variables whose values are computed at expansion time and injected into the replacement via {{var_name}}. See https://espanso.org/docs/matches/variables/",
|
|
153
|
+
"additionalItems": false,
|
|
154
|
+
"items": { "$ref": "#/definitions/var" }
|
|
155
|
+
},
|
|
156
|
+
"label": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"minLength": 1,
|
|
159
|
+
"description": "Override the display name of this match in the Espanso search bar. See https://espanso.org/docs/matches/basics/#search-labels"
|
|
160
|
+
},
|
|
161
|
+
"word": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"description": "When true, the match only triggers if surrounded by word separators (spaces, commas, newlines). Useful for spell-check replacements. See https://espanso.org/docs/matches/basics/#word-triggers"
|
|
164
|
+
},
|
|
165
|
+
"left_word": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"description": "When true, the match only triggers if there is a word separator to the left of the trigger. See https://espanso.org/docs/matches/basics/#word-triggers"
|
|
168
|
+
},
|
|
169
|
+
"right_word": {
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"description": "When true, the match only triggers if there is a word separator to the right of the trigger. See https://espanso.org/docs/matches/basics/#word-triggers"
|
|
172
|
+
},
|
|
173
|
+
"propagate_case": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"description": "When true, expands the match while preserving the casing of the trigger. See https://espanso.org/docs/matches/basics/#case-propagation"
|
|
176
|
+
},
|
|
177
|
+
"uppercase_style": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": ["capitalize", "capitalize_words", "uppercase"],
|
|
180
|
+
"description": "Controls how uppercase casing is applied when `propagate_case` is true and the trigger is typed with initial caps. `capitalize` capitalizes the first word; `capitalize_words` capitalizes every word; `uppercase` renders the whole replacement in caps. Requires `propagate_case: true`. See https://espanso.org/docs/matches/basics/#case-propagation"
|
|
181
|
+
},
|
|
182
|
+
"passive_only": {
|
|
183
|
+
"type": "boolean",
|
|
184
|
+
"default": false,
|
|
185
|
+
"description": "When true, this match only expands in passive mode. A deprecated feature; see https://espanso.org/docs/legacy/passive-mode/"
|
|
186
|
+
},
|
|
187
|
+
"force_mode": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"enum": ["clipboard", "keys"],
|
|
190
|
+
"description": "Override the global text injection mechanism for this match. `clipboard` injects via the clipboard; `keys` simulates keypresses. See https://espanso.org/docs/matches/basics/#injection-mechanism"
|
|
191
|
+
},
|
|
192
|
+
"force_clipboard": {
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"description": "Deprecated. Previously forced clipboard-based injection. Use `force_mode: clipboard` instead."
|
|
195
|
+
},
|
|
196
|
+
"debug": {
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"default": false,
|
|
199
|
+
"description": "When true, enables verbose debug output for this match in `espanso log`. See https://espanso.org/docs/matches/extensions/#debugging"
|
|
200
|
+
},
|
|
201
|
+
"search_terms": {
|
|
202
|
+
"type": "array",
|
|
203
|
+
"items": { "type": "string" },
|
|
204
|
+
"description": "Extra keywords that make this match findable in the Espanso search bar. These terms do not affect triggering. See https://espanso.org/docs/get-started/#search-bar"
|
|
205
|
+
},
|
|
206
|
+
"comment": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"description": "A human-readable annotation attached directly to this match entry."
|
|
209
|
+
},
|
|
210
|
+
"anchor": {
|
|
211
|
+
"$ref": "#/definitions/anchor",
|
|
212
|
+
"description": "Define a YAML anchor on this match for reuse elsewhere via *anchor_name. See https://espanso.org/docs/matches/extensions/#anchors-and-aliases"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
"var": {
|
|
218
|
+
"description": "A variable whose value is computed at expansion time using one of Espanso's extension types. See https://espanso.org/docs/matches/extensions/",
|
|
219
|
+
"oneOf": [
|
|
220
|
+
{
|
|
221
|
+
"$comment": "shell var — runs a shell command and captures output",
|
|
222
|
+
"type": "object",
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"required": ["type", "name", "params"],
|
|
225
|
+
"properties": {
|
|
226
|
+
"type": { "type": "string", "enum": ["shell"] },
|
|
227
|
+
"name": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"minLength": 1,
|
|
230
|
+
"pattern": "^\\w+$",
|
|
231
|
+
"description": "The variable name, referenced in the replacement as {{name}}. See https://espanso.org/docs/matches/variables/"
|
|
232
|
+
},
|
|
233
|
+
"params": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"required": ["cmd"],
|
|
237
|
+
"description": "Shell extension parameters. See https://espanso.org/docs/matches/extensions/#shell-extension",
|
|
238
|
+
"properties": {
|
|
239
|
+
"cmd": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "The shell command to run. Its stdout becomes the variable value. See https://espanso.org/docs/matches/extensions/#shell-extension"
|
|
242
|
+
},
|
|
243
|
+
"shell": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"enum": ["bash", "cmd", "nu", "powershell", "pwsh", "sh", "wsl", "wsl2", "zsh"],
|
|
246
|
+
"description": "The shell to run the command in. Defaults to the system shell. See https://espanso.org/docs/matches/extensions/#choosing-the-shell"
|
|
247
|
+
},
|
|
248
|
+
"trim": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "When true, trims whitespace and trailing newlines from the command output. See https://espanso.org/docs/matches/extensions/#trimming-the-output"
|
|
251
|
+
},
|
|
252
|
+
"debug": {
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"description": "When true, logs the shell extension result to `espanso log`. See https://espanso.org/docs/matches/extensions/#debugging"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"inject_vars": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
261
|
+
},
|
|
262
|
+
"depends_on": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"items": { "type": "string" },
|
|
265
|
+
"description": "List of variable names this variable depends on. Forces evaluation order. See https://espanso.org/docs/matches/variables/#specify-the-depends_on-option-when-needed"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"$comment": "script var — runs an external script and captures output",
|
|
271
|
+
"type": "object",
|
|
272
|
+
"additionalProperties": false,
|
|
273
|
+
"required": ["type", "name", "params"],
|
|
274
|
+
"properties": {
|
|
275
|
+
"type": { "type": "string", "enum": ["script"] },
|
|
276
|
+
"name": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"minLength": 1,
|
|
279
|
+
"pattern": "^\\w+$",
|
|
280
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
281
|
+
},
|
|
282
|
+
"params": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"additionalProperties": false,
|
|
285
|
+
"required": ["args"],
|
|
286
|
+
"description": "Script extension parameters. See https://espanso.org/docs/matches/extensions/#script-extension",
|
|
287
|
+
"properties": {
|
|
288
|
+
"args": {
|
|
289
|
+
"type": "array",
|
|
290
|
+
"additionalItems": false,
|
|
291
|
+
"items": { "type": "string" },
|
|
292
|
+
"description": "Arguments to the script runner. First element is the interpreter (e.g. 'ruby'), second is the script path, remaining are passed as arguments. No upper limit on count. See https://espanso.org/docs/matches/extensions/#script-extension"
|
|
293
|
+
},
|
|
294
|
+
"trim": {
|
|
295
|
+
"type": "boolean",
|
|
296
|
+
"description": "When true, trims whitespace and trailing newlines from the script output."
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"inject_vars": {
|
|
301
|
+
"type": "boolean",
|
|
302
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
303
|
+
},
|
|
304
|
+
"depends_on": {
|
|
305
|
+
"type": "array",
|
|
306
|
+
"items": { "type": "string" },
|
|
307
|
+
"description": "List of variable names this variable depends on. Forces evaluation order. See https://espanso.org/docs/matches/variables/#specify-the-depends_on-option-when-needed"
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"$comment": "date var — inserts a formatted date/time string",
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"required": ["type", "name", "params"],
|
|
316
|
+
"properties": {
|
|
317
|
+
"type": { "type": "string", "enum": ["date"] },
|
|
318
|
+
"name": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"minLength": 1,
|
|
321
|
+
"pattern": "^\\w+$",
|
|
322
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
323
|
+
},
|
|
324
|
+
"params": {
|
|
325
|
+
"type": "object",
|
|
326
|
+
"additionalProperties": false,
|
|
327
|
+
"required": ["format"],
|
|
328
|
+
"description": "Date extension parameters. See https://espanso.org/docs/matches/extensions/#date-extension",
|
|
329
|
+
"properties": {
|
|
330
|
+
"format": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"description": "A strftime-compatible format string defining how the date is rendered (e.g. '%Y-%m-%d'). See https://espanso.org/docs/matches/extensions/#date-extension"
|
|
333
|
+
},
|
|
334
|
+
"offset": {
|
|
335
|
+
"type": "integer",
|
|
336
|
+
"description": "Seconds to add to the current time before formatting (e.g. 86400 for +1 day). See https://espanso.org/docs/matches/extensions/#future-and-past-dates"
|
|
337
|
+
},
|
|
338
|
+
"locale": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "BCP47 locale code forcing locale-specific date formatting (e.g. 'en-US', 'ja-JP'). See https://espanso.org/docs/matches/extensions/#advanced-localized-dates",
|
|
341
|
+
"enum": [
|
|
342
|
+
"aa-DJ","aa-ER","aa-ET","af-ZA","agr-PE","ak-GH","am-ET","an-ES","anp-IN",
|
|
343
|
+
"ar-AE","ar-BH","ar-DZ","ar-EG","ar-IN","ar-IQ","ar-JO","ar-KW","ar-LB",
|
|
344
|
+
"ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SD","ar-SS","ar-SY","ar-TN",
|
|
345
|
+
"ar-YE","as-IN","ast-ES","ayc-PE","az-AZ","az-IR","be-BY","bem-ZM","ber-DZ",
|
|
346
|
+
"ber-MA","bg-BG","bhb-IN","bho-IN","bho-NP","bi-VU","bn-BD","bn-IN","bo-CN",
|
|
347
|
+
"bo-IN","br-FR","brx-IN","bs-BA","byn-ER","ca-AD","ca-ES","ca-FR","ca-IT",
|
|
348
|
+
"ce-RU","chr-US","cmn-TW","crh-UA","cs-CZ","csb-PL","cv-RU","cy-GB","da-DK",
|
|
349
|
+
"de-AT","de-BE","de-CH","de-DE","de-IT","de-LI","de-LU","doi-IN","dsb-DE",
|
|
350
|
+
"dv-MV","dz-BT","el-CY","el-GR","en-AG","en-AU","en-BW","en-CA","en-DK",
|
|
351
|
+
"en-GB","en-HK","en-IE","en-IL","en-IN","en-NG","en-NZ","en-PH","en-SC",
|
|
352
|
+
"en-SG","en-US","en-ZA","en-ZM","en-ZW","eo","es-AR","es-BO","es-CL","es-CO",
|
|
353
|
+
"es-CR","es-CU","es-DO","es-EC","es-ES","es-GT","es-HN","es-MX","es-NI",
|
|
354
|
+
"es-PA","es-PE","es-PR","es-PY","es-SV","es-US","es-UY","es-VE","et-EE",
|
|
355
|
+
"eu-ES","fa-IR","ff-SN","fi-FI","fil-PH","fo-FO","fr-BE","fr-CA","fr-CH",
|
|
356
|
+
"fr-FR","fr-LU","fur-IT","fy-DE","fy-NL","ga-IE","gd-GB","gez-ER","gez-ET",
|
|
357
|
+
"gl-ES","gu-IN","gv-GB","ha-NG","hak-TW","he-IL","hi-IN","hif-FJ","hne-IN",
|
|
358
|
+
"hr-HR","hsb-DE","ht-HT","hu-HU","hy-AM","ia-FR","id-ID","ig-NG","ik-CA",
|
|
359
|
+
"is-IS","it-CH","it-IT","iu-CA","ja-JP","ka-GE","kab-DZ","kk-KZ","kl-GL",
|
|
360
|
+
"km-KH","kn-IN","ko-KR","kok-IN","ks-IN","ku-TR","kw-GB","ky-KG","lb-LU",
|
|
361
|
+
"lg-UG","li-BE","li-NL","lij-IT","ln-CD","lo-LA","lt-LT","lv-LV","lzh-TW",
|
|
362
|
+
"mag-IN","mai-IN","mai-NP","mfe-MU","mg-MG","mhr-RU","mi-NZ","miq-NI",
|
|
363
|
+
"mjw-IN","mk-MK","ml-IN","mn-MN","mni-IN","mnw-MM","mr-IN","ms-MY","mt-MT",
|
|
364
|
+
"my-MM","nan-TW","nb-NO","nds-DE","nds-NL","ne-NP","nhn-MX","niu-NU",
|
|
365
|
+
"niu-NZ","nl-AW","nl-BE","nl-NL","nn-NO","nr-ZA","nso-ZA","oc-FR","om-ET",
|
|
366
|
+
"om-KE","or-IN","os-RU","pa-IN","pa-PK","pap-AW","pap-CW","pl-PL","ps-AF",
|
|
367
|
+
"pt-BR","pt-PT","quz-PE","raj-IN","ro-RO","ru-RU","ru-UA","rw-RW","sa-IN",
|
|
368
|
+
"sah-RU","sat-IN","sc-IT","sd-IN","se-NO","sgs-LT","shn-MM","shs-CA","si-LK",
|
|
369
|
+
"sid-ET","sk-SK","sl-SI","sm-WS","so-DJ","so-ET","so-KE","so-SO","sq-AL",
|
|
370
|
+
"sq-MK","sr-ME","sr-RS","ss-ZA","st-ZA","sv-FI","sv-SE","sw-KE","sw-TZ",
|
|
371
|
+
"szl-PL","ta-IN","ta-LK","tcy-IN","te-IN","tg-TJ","th-TH","the-NP","ti-ER",
|
|
372
|
+
"ti-ET","tig-ER","tk-TM","tl-PH","tn-ZA","to-TO","tpi-PG","tr-CY","tr-TR",
|
|
373
|
+
"ts-ZA","tt-RU","ug-CN","uk-UA","unm-US","ur-IN","ur-PK","uz-UZ","ve-ZA",
|
|
374
|
+
"vi-VN","wa-BE","wae-CH","wal-ET","wo-SN","xh-ZA","yi-US","yo-NG","yue-HK",
|
|
375
|
+
"yuw-PG","zh-CN","zh-HK","zh-SG","zh-TW","zu-ZA"
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
"tz": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "IANA timezone name (e.g. 'UTC', 'America/New_York', 'Europe/Paris'). See https://espanso.org/docs/matches/extensions/#date-extension",
|
|
381
|
+
"enum": [
|
|
382
|
+
"Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers",
|
|
383
|
+
"Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul",
|
|
384
|
+
"Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura",
|
|
385
|
+
"Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry",
|
|
386
|
+
"Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala",
|
|
387
|
+
"Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare",
|
|
388
|
+
"Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum",
|
|
389
|
+
"Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville",
|
|
390
|
+
"Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka",
|
|
391
|
+
"Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane",
|
|
392
|
+
"Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena",
|
|
393
|
+
"Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo",
|
|
394
|
+
"Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis",
|
|
395
|
+
"Africa/Windhoek",
|
|
396
|
+
"America/Adak","America/Anchorage","America/Anguilla","America/Antigua",
|
|
397
|
+
"America/Araguaina","America/Argentina/Buenos_Aires",
|
|
398
|
+
"America/Argentina/Catamarca","America/Argentina/ComodRivadavia",
|
|
399
|
+
"America/Argentina/Cordoba","America/Argentina/Jujuy",
|
|
400
|
+
"America/Argentina/La_Rioja","America/Argentina/Mendoza",
|
|
401
|
+
"America/Argentina/Rio_Gallegos","America/Argentina/Salta",
|
|
402
|
+
"America/Argentina/San_Juan","America/Argentina/San_Luis",
|
|
403
|
+
"America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba",
|
|
404
|
+
"America/Asuncion","America/Atikokan","America/Atka","America/Bahia",
|
|
405
|
+
"America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize",
|
|
406
|
+
"America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise",
|
|
407
|
+
"America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande",
|
|
408
|
+
"America/Cancun","America/Caracas","America/Catamarca","America/Cayenne",
|
|
409
|
+
"America/Cayman","America/Chicago","America/Chihuahua",
|
|
410
|
+
"America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba",
|
|
411
|
+
"America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba",
|
|
412
|
+
"America/Curacao","America/Danmarkshavn","America/Dawson",
|
|
413
|
+
"America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica",
|
|
414
|
+
"America/Edmonton","America/Eirunepe","America/El_Salvador",
|
|
415
|
+
"America/Ensenada","America/Fort_Nelson","America/Fort_Wayne",
|
|
416
|
+
"America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay",
|
|
417
|
+
"America/Grand_Turk","America/Grenada","America/Guadeloupe",
|
|
418
|
+
"America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax",
|
|
419
|
+
"America/Havana","America/Hermosillo","America/Indiana/Indianapolis",
|
|
420
|
+
"America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg",
|
|
421
|
+
"America/Indiana/Tell_City","America/Indiana/Vevay",
|
|
422
|
+
"America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis",
|
|
423
|
+
"America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy",
|
|
424
|
+
"America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello",
|
|
425
|
+
"America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima",
|
|
426
|
+
"America/Los_Angeles","America/Louisville","America/Lower_Princes",
|
|
427
|
+
"America/Maceio","America/Managua","America/Manaus","America/Marigot",
|
|
428
|
+
"America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza",
|
|
429
|
+
"America/Menominee","America/Merida","America/Metlakatla",
|
|
430
|
+
"America/Mexico_City","America/Miquelon","America/Moncton",
|
|
431
|
+
"America/Monterrey","America/Montevideo","America/Montreal",
|
|
432
|
+
"America/Montserrat","America/Nassau","America/New_York","America/Nipigon",
|
|
433
|
+
"America/Nome","America/Noronha","America/North_Dakota/Beulah",
|
|
434
|
+
"America/North_Dakota/Center","America/North_Dakota/New_Salem",
|
|
435
|
+
"America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung",
|
|
436
|
+
"America/Paramaribo","America/Phoenix","America/Port-au-Prince",
|
|
437
|
+
"America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho",
|
|
438
|
+
"America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River",
|
|
439
|
+
"America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute",
|
|
440
|
+
"America/Rio_Branco","America/Rosario","America/Santa_Isabel",
|
|
441
|
+
"America/Santarem","America/Santiago","America/Santo_Domingo",
|
|
442
|
+
"America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka",
|
|
443
|
+
"America/St_Barthelemy","America/St_Johns","America/St_Kitts",
|
|
444
|
+
"America/St_Lucia","America/St_Thomas","America/St_Vincent",
|
|
445
|
+
"America/Swift_Current","America/Tegucigalpa","America/Thule",
|
|
446
|
+
"America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola",
|
|
447
|
+
"America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg",
|
|
448
|
+
"America/Yakutat","America/Yellowknife",
|
|
449
|
+
"Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville",
|
|
450
|
+
"Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo",
|
|
451
|
+
"Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole",
|
|
452
|
+
"Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok",
|
|
453
|
+
"Arctic/Longyearbyen",
|
|
454
|
+
"Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau",
|
|
455
|
+
"Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad",
|
|
456
|
+
"Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut",
|
|
457
|
+
"Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan",
|
|
458
|
+
"Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus",
|
|
459
|
+
"Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta",
|
|
460
|
+
"Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong",
|
|
461
|
+
"Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura",
|
|
462
|
+
"Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar",
|
|
463
|
+
"Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata",
|
|
464
|
+
"Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait",
|
|
465
|
+
"Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila",
|
|
466
|
+
"Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk",
|
|
467
|
+
"Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang",
|
|
468
|
+
"Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh",
|
|
469
|
+
"Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai",
|
|
470
|
+
"Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent",
|
|
471
|
+
"Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu",
|
|
472
|
+
"Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar",
|
|
473
|
+
"Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane",
|
|
474
|
+
"Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg",
|
|
475
|
+
"Asia/Yerevan",
|
|
476
|
+
"Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde",
|
|
477
|
+
"Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira",
|
|
478
|
+
"Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena",
|
|
479
|
+
"Atlantic/Stanley",
|
|
480
|
+
"Australia/ACT","Australia/Adelaide","Australia/Brisbane",
|
|
481
|
+
"Australia/Broken_Hill","Australia/Canberra","Australia/Currie",
|
|
482
|
+
"Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI",
|
|
483
|
+
"Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne",
|
|
484
|
+
"Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland",
|
|
485
|
+
"Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria",
|
|
486
|
+
"Australia/West","Australia/Yancowinna",
|
|
487
|
+
"Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West",
|
|
488
|
+
"CET","CST6CDT",
|
|
489
|
+
"Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain",
|
|
490
|
+
"Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon",
|
|
491
|
+
"Chile/Continental","Chile/EasterIsland",
|
|
492
|
+
"Cuba","EET","EST","EST5EDT","Egypt","Eire",
|
|
493
|
+
"Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12",
|
|
494
|
+
"Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7",
|
|
495
|
+
"Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11",
|
|
496
|
+
"Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4",
|
|
497
|
+
"Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0",
|
|
498
|
+
"Etc/Greenwich","Etc/UCT","Etc/UTC","Etc/Universal","Etc/Zulu",
|
|
499
|
+
"Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens",
|
|
500
|
+
"Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava",
|
|
501
|
+
"Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen",
|
|
502
|
+
"Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar",
|
|
503
|
+
"Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul",
|
|
504
|
+
"Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov",
|
|
505
|
+
"Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London",
|
|
506
|
+
"Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn",
|
|
507
|
+
"Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo",
|
|
508
|
+
"Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome",
|
|
509
|
+
"Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov",
|
|
510
|
+
"Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm",
|
|
511
|
+
"Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk",
|
|
512
|
+
"Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna",
|
|
513
|
+
"Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb",
|
|
514
|
+
"Europe/Zaporozhye","Europe/Zurich",
|
|
515
|
+
"GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich",
|
|
516
|
+
"HST","Hongkong","Iceland",
|
|
517
|
+
"Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos",
|
|
518
|
+
"Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives",
|
|
519
|
+
"Indian/Mauritius","Indian/Mayotte","Indian/Reunion",
|
|
520
|
+
"Iran","Israel","Jamaica","Japan","Kwajalein","Libya",
|
|
521
|
+
"MET","MST","MST7MDT",
|
|
522
|
+
"Mexico/BajaNorte","Mexico/BajaSur","Mexico/General",
|
|
523
|
+
"NZ","NZ-CHAT","Navajo","PRC","PST8PDT",
|
|
524
|
+
"Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham",
|
|
525
|
+
"Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury",
|
|
526
|
+
"Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos",
|
|
527
|
+
"Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu",
|
|
528
|
+
"Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae",
|
|
529
|
+
"Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway",
|
|
530
|
+
"Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea",
|
|
531
|
+
"Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei",
|
|
532
|
+
"Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan",
|
|
533
|
+
"Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu",
|
|
534
|
+
"Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap",
|
|
535
|
+
"Poland","Portugal","ROC","ROK","Singapore","Turkey",
|
|
536
|
+
"UCT","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana",
|
|
537
|
+
"US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain",
|
|
538
|
+
"US/Pacific","US/Samoa","UTC","Universal","W-SU","WET","Zulu"
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
"debug": {
|
|
542
|
+
"type": "boolean",
|
|
543
|
+
"description": "When true, logs the date extension result to `espanso log`."
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"inject_vars": {
|
|
548
|
+
"type": "boolean",
|
|
549
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
550
|
+
},
|
|
551
|
+
"depends_on": {
|
|
552
|
+
"type": "array",
|
|
553
|
+
"items": { "type": "string" },
|
|
554
|
+
"description": "List of variable names this variable depends on. Forces evaluation order. See https://espanso.org/docs/matches/variables/#specify-the-depends_on-option-when-needed"
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"$comment": "echo var — outputs a fixed string value",
|
|
560
|
+
"type": "object",
|
|
561
|
+
"additionalProperties": false,
|
|
562
|
+
"required": ["type", "name", "params"],
|
|
563
|
+
"properties": {
|
|
564
|
+
"type": { "type": "string", "enum": ["echo"] },
|
|
565
|
+
"name": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"minLength": 1,
|
|
568
|
+
"pattern": "^\\w+$",
|
|
569
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
570
|
+
},
|
|
571
|
+
"params": {
|
|
572
|
+
"type": "object",
|
|
573
|
+
"additionalProperties": false,
|
|
574
|
+
"required": ["echo"],
|
|
575
|
+
"description": "Echo extension parameters. See https://espanso.org/docs/matches/extensions/#echo-extension",
|
|
576
|
+
"properties": {
|
|
577
|
+
"echo": {
|
|
578
|
+
"type": "string",
|
|
579
|
+
"description": "The fixed string value this variable will output. See https://espanso.org/docs/matches/extensions/#echo-extension"
|
|
580
|
+
},
|
|
581
|
+
"trim": {
|
|
582
|
+
"type": "boolean",
|
|
583
|
+
"description": "When true, trims whitespace from the echo value."
|
|
584
|
+
},
|
|
585
|
+
"debug": {
|
|
586
|
+
"type": "boolean",
|
|
587
|
+
"description": "When true, logs the echo extension result to `espanso log`."
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"inject_vars": {
|
|
592
|
+
"type": "boolean",
|
|
593
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
594
|
+
},
|
|
595
|
+
"depends_on": {
|
|
596
|
+
"type": "array",
|
|
597
|
+
"items": { "type": "string" },
|
|
598
|
+
"description": "List of variable names this variable depends on. Forces evaluation order."
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"$comment": "clipboard var — inserts the current clipboard contents. No params needed.",
|
|
604
|
+
"type": "object",
|
|
605
|
+
"additionalProperties": false,
|
|
606
|
+
"required": ["type", "name"],
|
|
607
|
+
"properties": {
|
|
608
|
+
"type": { "type": "string", "enum": ["clipboard"] },
|
|
609
|
+
"name": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"minLength": 1,
|
|
612
|
+
"pattern": "^\\w+$",
|
|
613
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
614
|
+
},
|
|
615
|
+
"params": {
|
|
616
|
+
"type": "object",
|
|
617
|
+
"additionalProperties": false,
|
|
618
|
+
"description": "Clipboard extension takes no parameters. An empty object is accepted for compatibility."
|
|
619
|
+
},
|
|
620
|
+
"inject_vars": {
|
|
621
|
+
"type": "boolean",
|
|
622
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
623
|
+
},
|
|
624
|
+
"depends_on": {
|
|
625
|
+
"type": "array",
|
|
626
|
+
"items": { "type": "string" },
|
|
627
|
+
"description": "List of variable names this variable depends on. Forces evaluation order."
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"$comment": "choice var — presents a selection dialog; the user picks a value at expansion time",
|
|
633
|
+
"type": "object",
|
|
634
|
+
"additionalProperties": false,
|
|
635
|
+
"required": ["type", "name", "params"],
|
|
636
|
+
"properties": {
|
|
637
|
+
"type": { "type": "string", "enum": ["choice"] },
|
|
638
|
+
"name": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"minLength": 1,
|
|
641
|
+
"pattern": "^\\w+$",
|
|
642
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
643
|
+
},
|
|
644
|
+
"params": {
|
|
645
|
+
"type": "object",
|
|
646
|
+
"additionalProperties": false,
|
|
647
|
+
"required": ["values"],
|
|
648
|
+
"description": "Choice extension parameters. See https://espanso.org/docs/matches/extensions/#choice-extension",
|
|
649
|
+
"properties": {
|
|
650
|
+
"values": {
|
|
651
|
+
"type": "array",
|
|
652
|
+
"description": "The list of options to present. Each item is a plain string or an object with 'label' (display text) and 'id' (returned value). See https://espanso.org/docs/matches/extensions/#advanced-use-with-ids",
|
|
653
|
+
"items": {
|
|
654
|
+
"oneOf": [
|
|
655
|
+
{ "type": "string" },
|
|
656
|
+
{
|
|
657
|
+
"type": "object",
|
|
658
|
+
"required": ["label", "id"],
|
|
659
|
+
"properties": {
|
|
660
|
+
"label": { "type": "string", "description": "Text shown in the selection dialog." },
|
|
661
|
+
"id": { "type": "string", "description": "Value returned when this option is chosen." }
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
]
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
"debug": {
|
|
668
|
+
"type": "boolean",
|
|
669
|
+
"description": "When true, logs the choice extension result to `espanso log`."
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"inject_vars": {
|
|
674
|
+
"type": "boolean",
|
|
675
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
676
|
+
},
|
|
677
|
+
"depends_on": {
|
|
678
|
+
"type": "array",
|
|
679
|
+
"items": { "type": "string" },
|
|
680
|
+
"description": "List of variable names this variable depends on. Forces evaluation order."
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"$comment": "form var — renders an inline form within a variable for complex multi-field expansions",
|
|
686
|
+
"type": "object",
|
|
687
|
+
"additionalProperties": false,
|
|
688
|
+
"required": ["type", "name", "params"],
|
|
689
|
+
"properties": {
|
|
690
|
+
"type": { "type": "string", "enum": ["form"] },
|
|
691
|
+
"name": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"minLength": 1,
|
|
694
|
+
"pattern": "^\\w+$",
|
|
695
|
+
"description": "The variable name. Fields are referenced in the replacement as {{name.field_name}} using dot notation."
|
|
696
|
+
},
|
|
697
|
+
"params": {
|
|
698
|
+
"type": "object",
|
|
699
|
+
"additionalProperties": false,
|
|
700
|
+
"required": ["layout"],
|
|
701
|
+
"description": "Form extension parameters. See https://espanso.org/docs/matches/forms/",
|
|
702
|
+
"properties": {
|
|
703
|
+
"layout": {
|
|
704
|
+
"type": "string",
|
|
705
|
+
"description": "The form layout string. Fields use [[field_name]] syntax and are referenced in the replacement as {{var_name.field_name}}. See https://espanso.org/docs/matches/forms/"
|
|
706
|
+
},
|
|
707
|
+
"fields": {
|
|
708
|
+
"$ref": "#/definitions/form_field_definition",
|
|
709
|
+
"description": "Configuration for individual form fields referenced in the layout."
|
|
710
|
+
},
|
|
711
|
+
"debug": {
|
|
712
|
+
"type": "boolean",
|
|
713
|
+
"description": "When true, logs the form extension result to `espanso log`."
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
"inject_vars": {
|
|
718
|
+
"type": "boolean",
|
|
719
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
720
|
+
},
|
|
721
|
+
"depends_on": {
|
|
722
|
+
"type": "array",
|
|
723
|
+
"items": { "type": "string" },
|
|
724
|
+
"description": "List of variable names this variable depends on. Forces evaluation order."
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"$comment": "random var — picks one value at random from a list at expansion time",
|
|
730
|
+
"type": "object",
|
|
731
|
+
"additionalProperties": false,
|
|
732
|
+
"required": ["type", "name", "params"],
|
|
733
|
+
"properties": {
|
|
734
|
+
"type": { "type": "string", "enum": ["random"] },
|
|
735
|
+
"name": {
|
|
736
|
+
"type": "string",
|
|
737
|
+
"minLength": 1,
|
|
738
|
+
"pattern": "^\\w+$",
|
|
739
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
740
|
+
},
|
|
741
|
+
"params": {
|
|
742
|
+
"type": "object",
|
|
743
|
+
"additionalProperties": false,
|
|
744
|
+
"required": ["choices"],
|
|
745
|
+
"description": "Random extension parameters. See https://espanso.org/docs/matches/extensions/#random-extension",
|
|
746
|
+
"properties": {
|
|
747
|
+
"choices": {
|
|
748
|
+
"type": "array",
|
|
749
|
+
"items": { "type": "string" },
|
|
750
|
+
"description": "The list of strings Espanso randomly selects from at expansion time. See https://espanso.org/docs/matches/extensions/#random-extension"
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"$comment": "global var — references a global variable defined in global_vars at the file level",
|
|
758
|
+
"type": "object",
|
|
759
|
+
"additionalProperties": false,
|
|
760
|
+
"required": ["type", "name"],
|
|
761
|
+
"properties": {
|
|
762
|
+
"type": { "type": "string", "enum": ["global"] },
|
|
763
|
+
"name": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"minLength": 1,
|
|
766
|
+
"pattern": "^\\w+$",
|
|
767
|
+
"description": "The variable name, referenced in the replacement as {{name}}. Must match a name defined in global_vars."
|
|
768
|
+
},
|
|
769
|
+
"params": {
|
|
770
|
+
"type": "object",
|
|
771
|
+
"additionalProperties": false,
|
|
772
|
+
"description": "Global var takes no parameters. An empty object is accepted for compatibility."
|
|
773
|
+
},
|
|
774
|
+
"inject_vars": {
|
|
775
|
+
"type": "boolean",
|
|
776
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
777
|
+
},
|
|
778
|
+
"depends_on": {
|
|
779
|
+
"type": "array",
|
|
780
|
+
"items": { "type": "string" },
|
|
781
|
+
"description": "List of variable names this variable depends on. Forces evaluation order."
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"$comment": "match var — expands another match inline by its trigger",
|
|
787
|
+
"type": "object",
|
|
788
|
+
"additionalProperties": false,
|
|
789
|
+
"required": ["type", "name", "params"],
|
|
790
|
+
"properties": {
|
|
791
|
+
"type": { "type": "string", "enum": ["match"] },
|
|
792
|
+
"name": {
|
|
793
|
+
"type": "string",
|
|
794
|
+
"minLength": 1,
|
|
795
|
+
"pattern": "^\\w+$",
|
|
796
|
+
"description": "The variable name, referenced in the replacement as {{name}}."
|
|
797
|
+
},
|
|
798
|
+
"params": {
|
|
799
|
+
"type": "object",
|
|
800
|
+
"additionalProperties": false,
|
|
801
|
+
"required": ["trigger"],
|
|
802
|
+
"description": "Nested match parameters.",
|
|
803
|
+
"properties": {
|
|
804
|
+
"trigger": {
|
|
805
|
+
"type": "string",
|
|
806
|
+
"description": "The trigger of the match to expand inline at the variable's position."
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
"inject_vars": {
|
|
811
|
+
"type": "boolean",
|
|
812
|
+
"description": "When true, other variable values are injected into this variable's params before evaluation."
|
|
813
|
+
},
|
|
814
|
+
"depends_on": {
|
|
815
|
+
"type": "array",
|
|
816
|
+
"items": { "type": "string" },
|
|
817
|
+
"description": "List of variable names this variable depends on. Forces evaluation order."
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
]
|
|
822
|
+
},
|
|
823
|
+
|
|
824
|
+
"anchor": {
|
|
825
|
+
"$comment": "https://espanso.org/docs/matches/extensions/#anchors-and-aliases",
|
|
826
|
+
"type": "string",
|
|
827
|
+
"description": "A YAML anchor name enabling reuse of match content via aliases (*anchor_name). See https://espanso.org/docs/matches/extensions/#anchors-and-aliases"
|
|
828
|
+
},
|
|
829
|
+
|
|
830
|
+
"form_field_definition": {
|
|
831
|
+
"type": "object",
|
|
832
|
+
"description": "A map of field names to their configuration. Each key must correspond to a [[field_name]] entry in the form layout. Each value is either a plain text field or a choice/list field. See https://espanso.org/docs/matches/forms/#controls",
|
|
833
|
+
"additionalProperties": false,
|
|
834
|
+
"patternProperties": {
|
|
835
|
+
"^.*$": {
|
|
836
|
+
"anyOf": [
|
|
837
|
+
{ "$ref": "#/definitions/form_multiline_field" },
|
|
838
|
+
{ "$ref": "#/definitions/form_choice_or_list_field" }
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
|
|
844
|
+
"form_multiline_field": {
|
|
845
|
+
"$comment": "A plain text or multiline text form field. This is the default field type — no type or values required.",
|
|
846
|
+
"type": "object",
|
|
847
|
+
"properties": {
|
|
848
|
+
"multiline": {
|
|
849
|
+
"type": "boolean",
|
|
850
|
+
"default": false,
|
|
851
|
+
"description": "When true, renders the field as a multiline text area instead of a single-line input. See https://espanso.org/docs/matches/forms/#text-fields"
|
|
852
|
+
},
|
|
853
|
+
"default": {
|
|
854
|
+
"type": "string",
|
|
855
|
+
"default": "",
|
|
856
|
+
"description": "Default value pre-filled in the field. See https://espanso.org/docs/matches/forms/#text-fields"
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
|
|
861
|
+
"form_choice_or_list_field": {
|
|
862
|
+
"$comment": "A choice or list dropdown form field. Requires both type and values.",
|
|
863
|
+
"type": "object",
|
|
864
|
+
"required": ["values", "type"],
|
|
865
|
+
"properties": {
|
|
866
|
+
"type": {
|
|
867
|
+
"type": "string",
|
|
868
|
+
"enum": ["choice", "list"],
|
|
869
|
+
"description": "The form control type. `choice` renders a dropdown; `list` renders a scrollable list box. See https://espanso.org/docs/matches/forms/#controls"
|
|
870
|
+
},
|
|
871
|
+
"values": {
|
|
872
|
+
"type": ["array", "string"],
|
|
873
|
+
"items": { "type": "string" },
|
|
874
|
+
"description": "The selectable options. Can be an array of strings or a YAML multiline string (one option per line). See https://espanso.org/docs/matches/forms/#choice-box"
|
|
875
|
+
},
|
|
876
|
+
"default": {
|
|
877
|
+
"type": "string",
|
|
878
|
+
"default": "",
|
|
879
|
+
"description": "Default selected value."
|
|
880
|
+
},
|
|
881
|
+
"trim_string_values": {
|
|
882
|
+
"type": "boolean",
|
|
883
|
+
"default": false,
|
|
884
|
+
"description": "When true and values is a multiline string, Espanso trims each value and removes empty ones. Use with the YAML pipe operator on the values key. See https://espanso.org/docs/matches/forms/#choice-box"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|