You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(prompt): structured options with name|key|description tuples and jq-style dynamic mapping
- parse_structured_options: parse name|key|description tuples from <<var [...]
- parse_dynamic_mapping: parse pipe + {name:path,key:path,desc:path} syntax
- apply_jq_mapping: map response data to structured picker items
- handle_prompt_variables: integrated both static tuples and dynamic mapping
- highlight: PostePromptOptSep, PostePromptMapping{Field,Colon,Path} groups
- completion: prompt_mapping context for field name completion
- docs: new Prompt Variables section in README with full syntax examples
- tests: 22 test cases covering all parsing and mapping scenarios
Prompt variables allow interactive input when running a request. When you execute a request with `<<` directives, Poste will prompt you for values before sending.
375
+
376
+
### Text Input
377
+
378
+
```
379
+
<<username
380
+
```
381
+
382
+
Shows a text input prompt for `username`. Press `<Enter>` to confirm or `<Esc>` to cancel.
383
+
384
+
### Selection from List (Simple Strings)
385
+
386
+
```
387
+
<<method [GET, POST, PUT, DELETE]
388
+
```
389
+
390
+
Shows a picker with the listed options. Selecting one substitutes `@method = <selected>`.
391
+
392
+
### Selection with Display Name, Key, and Description
393
+
394
+
```
395
+
<<method [GET|get|Send a GET request, POST|post|Send a POST request, PUT|put|Send a PUT request]
396
+
```
397
+
398
+
Each option is formatted as `name|key|description`:
399
+
-**name** — shown in the picker
400
+
-**key** — the actual value substituted into the request
401
+
-**description** — secondary text displayed alongside the name
402
+
403
+
Picker shows:
404
+
```
405
+
GET Send a GET request
406
+
POST Send a POST request
407
+
PUT Send a PUT request
408
+
```
409
+
410
+
Selecting `GET` writes `@method = get` (the key, not the display name) into the request.
411
+
412
+
Two-field form (name|key, no description):
413
+
```
414
+
<<method [GET|get, POST|post]
415
+
```
416
+
417
+
### Dynamic Options from Another Request
418
+
419
+
```http
420
+
### Get commits
421
+
GET https://api.github.com/repos/folke/snacks.nvim/commits
0 commit comments