markdown_exec 3.5.1 → 3.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.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.ai-agent-instructions +54 -0
  3. data/.cursorrules +198 -0
  4. data/.rubocop.wide.yml +5 -0
  5. data/.rubocop.yml +7 -2
  6. data/CHANGELOG.md +12 -1
  7. data/Gemfile.lock +1 -1
  8. data/Rakefile +2 -0
  9. data/ai-principles.md +516 -0
  10. data/architecture-decisions.md +190 -0
  11. data/bats/block-hide.bats +1 -1
  12. data/bats/block-type-bash.bats +5 -5
  13. data/bats/block-type-link.bats +1 -1
  14. data/bats/block-type-opts.bats +3 -3
  15. data/bats/block-type-port.bats +2 -2
  16. data/bats/block-type-shell-require-ux.bats +2 -2
  17. data/bats/block-type-ux-allowed.bats +4 -4
  18. data/bats/block-type-ux-auto.bats +1 -1
  19. data/bats/block-type-ux-chained.bats +1 -1
  20. data/bats/block-type-ux-default.bats +1 -1
  21. data/bats/block-type-ux-echo-hash-transform.bats +1 -1
  22. data/bats/block-type-ux-echo-hash.bats +2 -2
  23. data/bats/block-type-ux-echo.bats +3 -3
  24. data/bats/block-type-ux-exec-hash-transform.bats +1 -1
  25. data/bats/block-type-ux-exec-hash.bats +2 -2
  26. data/bats/block-type-ux-exec.bats +1 -1
  27. data/bats/block-type-ux-force.bats +1 -1
  28. data/bats/block-type-ux-formats.bats +1 -1
  29. data/bats/block-type-ux-hidden.bats +1 -1
  30. data/bats/block-type-ux-invalid.bats +1 -1
  31. data/bats/block-type-ux-readonly.bats +1 -1
  32. data/bats/block-type-ux-require-chained.bats +2 -2
  33. data/bats/block-type-ux-require-context.bats +2 -2
  34. data/bats/block-type-ux-require.bats +2 -2
  35. data/bats/block-type-ux-required-variables.bats +1 -1
  36. data/bats/block-type-ux-row-format.bats +1 -1
  37. data/bats/block-type-ux-sources.bats +4 -4
  38. data/bats/block-type-ux-transform.bats +1 -1
  39. data/bats/block-type-vars.bats +3 -3
  40. data/bats/border.bats +1 -1
  41. data/bats/cli.bats +11 -11
  42. data/bats/command-substitution-options.bats +2 -2
  43. data/bats/command-substitution.bats +1 -1
  44. data/bats/document-shell.bats +1 -1
  45. data/bats/history.bats +5 -5
  46. data/bats/import-conflict.bats +1 -1
  47. data/bats/import-directive-line-continuation.bats +1 -1
  48. data/bats/import-directive-parameter-symbols.bats +1 -1
  49. data/bats/import-duplicates.bats +6 -6
  50. data/bats/import-parameter-symbols.bats +1 -1
  51. data/bats/import-with-text-substitution.bats +1 -1
  52. data/bats/import.bats +3 -3
  53. data/bats/indented-block-type-vars.bats +1 -1
  54. data/bats/indented-multi-line-output.bats +1 -1
  55. data/bats/line-decor-dynamic.bats +1 -1
  56. data/bats/line-wrapping.bats +1 -1
  57. data/bats/load-vars-state-demo.bats +4 -4
  58. data/bats/markup.bats +4 -4
  59. data/bats/mde.bats +4 -4
  60. data/bats/option-expansion.bats +1 -1
  61. data/bats/options-collapse.bats +4 -4
  62. data/bats/options.bats +47 -17
  63. data/bats/plain.bats +1 -1
  64. data/bats/publish.bats +2 -2
  65. data/bats/table-column-truncate.bats +1 -1
  66. data/bats/table.bats +2 -2
  67. data/bats/variable-expansion-multiline.bats +1 -1
  68. data/bats/variable-expansion.bats +6 -6
  69. data/conversation-template.md +611 -0
  70. data/docs/block-execution-modes.md +177 -0
  71. data/docs/block-filtering.md +252 -0
  72. data/docs/block-naming-patterns.md +210 -0
  73. data/docs/block-scanning-patterns.md +248 -0
  74. data/docs/cli-reference.md +370 -0
  75. data/docs/dev/block-hide.md +1 -1
  76. data/docs/dev/block-type-ux-transform.md +5 -4
  77. data/docs/dev/print_bytes.md +3 -0
  78. data/docs/dev/shebang.md +6 -0
  79. data/docs/docker-testing.md +5 -0
  80. data/docs/execution-control.md +384 -0
  81. data/docs/getting-started.md +209 -0
  82. data/docs/import-options.md +391 -0
  83. data/docs/tab-completion.md +7 -0
  84. data/docs/ux-blocks.md +376 -0
  85. data/examples/linked1.md +8 -1
  86. data/implementation-decisions.md +212 -0
  87. data/lib/cached_nested_file_reader.rb +138 -1
  88. data/lib/command_result.rb +27 -6
  89. data/lib/executed_shell_command.rb +512 -0
  90. data/lib/filter.rb +7 -7
  91. data/lib/hash_delegator.rb +403 -350
  92. data/lib/link_history.rb +22 -11
  93. data/lib/markdown_exec/version.rb +1 -1
  94. data/lib/mdoc.rb +103 -44
  95. data/lib/menu.src.yml +110 -83
  96. data/lib/menu.yml +149 -83
  97. data/lib/transformed_shell_command.rb +449 -0
  98. data/lib/wl.rb +15 -0
  99. data/lib/ww.rb +16 -5
  100. data/requirements.md +111 -0
  101. data/semantic-tokens.md +132 -0
  102. data/tasks.md +69 -0
  103. metadata +26 -4
  104. data/docs/ux-blocks-examples.md +0 -120
  105. data/docs/ux-blocks-init-act.md +0 -100
data/lib/menu.yml CHANGED
@@ -26,18 +26,23 @@
26
26
  :procname: val_as_bool
27
27
  - :opt_name: block_batch_match
28
28
  :env_var: MDE_BLOCK_BATCH_MATCH
29
+ :description: Pattern to match blocks that should be executed in batch mode
29
30
  :default: "@batch"
30
31
  :procname: val_as_str
31
32
  - :opt_name: block_calls_scan
32
33
  :env_var: MDE_BLOCK_CALLS_SCAN
34
+ :description: Regex pattern to extract call names from block start lines (e.g.,
35
+ %call_name)
33
36
  :default: "%\\([^\\)]+\\)"
34
37
  :procname: val_as_str
35
38
  - :opt_name: block_disable_match
36
39
  :env_var: MDE_BLOCK_DISABLE_MATCH
40
+ :description: Pattern to match blocks that should be disabled (not executable)
37
41
  :default: "@disable"
38
42
  :procname: val_as_str
39
43
  - :opt_name: block_interactive_match
40
44
  :env_var: MDE_BLOCK_INTERACTIVE_MATCH
45
+ :description: Pattern to match blocks that should be executed in interactive mode
41
46
  :default: "@interactive"
42
47
  :procname: val_as_str
43
48
  - :opt_name: block_name
@@ -49,36 +54,43 @@
49
54
  :compreply: false
50
55
  :procname: val_as_str
51
56
  - :opt_name: block_name_hidden_match
52
- :env_var: MDE_BLOCK_NAME_HIDDEN_MATCH
53
- :description: Pattern for blocks to hide from user-selection
54
- :default: "^-.+-$"
55
- :procname: val_as_str
56
- - :opt_name: block_name_include_match
57
- :env_var: MDE_BLOCK_NAME_INCLUDE_MATCH
58
- :description: Pattern for blocks to hide from user-selection
57
+ :env_var: MDE_BLOCK_NAME_HIDE_CUSTOM_MATCH
58
+ :description: Regex pattern for block names that should be hidden from the menu
59
59
  :default: "^\\(.*\\)$"
60
60
  :procname: val_as_str
61
+ - :opt_name: block_name_hide_custom_match
62
+ :env_var: MDE_BLOCK_NAME_HIDE_CUSTOM_MATCH
63
+ :description: Regex pattern for block names that should be hidden from the menu
64
+ :default: "^-.+-$"
65
+ :procname: val_as_str
61
66
  - :opt_name: block_name_match
62
67
  :env_var: MDE_BLOCK_NAME_MATCH
63
- :description: Pattern for the block name in the line defining the block
68
+ :description: Regex pattern to extract the block name from the fenced code block
69
+ start line
64
70
  :default: ":(?<title>\\S+)( |$)"
65
71
  :procname: val_as_str
66
72
  - :opt_name: block_name_nick_match
67
73
  :env_var: MDE_BLOCK_NAME_NICK_MATCH
68
- :description: Pattern for block nicknames (name is not used in menu)
74
+ :description: Regex pattern for block nicknames (alternative names not displayed
75
+ in menu)
69
76
  :default: "^\\[.*\\]$"
70
77
  :procname: val_as_str
71
78
  - :opt_name: block_name_wrapper_match
72
79
  :env_var: MDE_BLOCK_NAME_WRAPPER_MATCH
73
- :description: Pattern for block names to use as wrappers
80
+ :description: Regex pattern for block names that act as wrappers (include other
81
+ blocks)
74
82
  :default: "^{.+}$"
75
83
  :procname: val_as_str
76
84
  - :opt_name: block_required_scan
77
85
  :env_var: MDE_BLOCK_REQUIRED_SCAN
86
+ :description: Regex pattern to scan block body for required dependencies (e.g.,
87
+ +blockname)
78
88
  :default: "\\+\\S+"
79
89
  :procname: val_as_str
80
90
  - :opt_name: block_stdin_scan
81
91
  :env_var: MDE_BLOCK_STDIN_SCAN
92
+ :description: Regex pattern to scan block body for stdin redirection (e.g., <variable
93
+ or <$variable)
82
94
  :default: "<(?<full>(?<type>\\$)?(?<name>[A-Za-z_\\-\\.\\w]+))"
83
95
  :procname: val_as_str
84
96
  - :opt_name: block_stdout_scan
@@ -88,64 +100,71 @@
88
100
  :procname: val_as_str
89
101
  - :opt_name: block_type_default
90
102
  :env_var: MDE_BLOCK_TYPE_DEFAULT
103
+ :description: Default shell type for blocks when no type is specified in the fenced
104
+ code block
91
105
  :default: bash
92
106
  :procname: val_as_str
93
107
  - :opt_name: block_type_port_set_format
94
108
  :env_var: MDE_BLOCK_TYPE_PORT_SET_FORMAT
109
+ :description: Format string for generating shell variable assignments from PORT
110
+ block content
95
111
  :default: ": ${%{key}:=%{value}}"
96
112
  :procname: val_as_str
97
113
  - :opt_name: blocks
98
114
  :arg_name: MESSAGE
99
115
  :default:
100
- :description: List the blocks displayed
116
+ :description: List all code blocks in the document with optional message format
101
117
  :env_var: MDE_BLOCKS_LIST_MESSAGE
102
118
  :long_name: blocks
103
119
  :procname: val_as_str
104
120
  - :opt_name: clear_screen_for_select_block
105
121
  :env_var: MDE_CLEAR_SCREEN_FOR_SELECT_BLOCK
106
- :description: clear_screen_for_select_block
122
+ :description: Clear the screen before displaying the block selection menu
107
123
  :arg_name: BOOL
108
124
  :default: true
109
125
  :procname: val_as_bool
110
126
  - :opt_name: command_substitution_name_capture_group
111
127
  :env_var: MDE_COMMAND_SUBSTITUTION_NAME_CAPTURE_GROUP
112
- :description: command_substitution_name_capture_group
128
+ :description: Named capture group name that extracts the command from command substitution
129
+ matches
113
130
  :default: command
114
131
  :procname: val_as_str
115
132
  - :opt_name: command_substitution_regexp
116
133
  :env_var: MDE_COMMAND_SUBSTITUTION_REGEXP
117
- :description: command_substitution_regexp
134
+ :description: Regex pattern that matches command substitutions (e.g., $(command))
118
135
  :default: "(?<expression>\\$\\((?<command>([^()]*(\\([^()]*\\))*[^()]*)*)\\))"
119
136
  :procname: val_as_str
120
137
  - :long_name: config
121
- :description: Read configuration file
138
+ :description: Read configuration file from specified path
122
139
  :arg_name: PATH
123
140
  :default: "."
124
141
  :procname: path
125
142
  - :opt_name: debounce_execution
126
143
  :env_var: MDE_DEBOUNCE_EXECUTION
127
- :description: debounce_execution
144
+ :description: Whether to prompt before re-executing the same block multiple times
128
145
  :arg_name: BOOL
129
146
  :default: true
130
147
  :procname: val_as_bool
131
148
  - :long_name: debug
132
149
  :short_name: d
133
150
  :env_var: MDE_DEBUG
134
- :description: Debug output
151
+ :description: Enable debug output with detailed internal information
135
152
  :arg_name: BOOL
136
153
  :default: false
137
154
  :procname: debug
138
155
  - :opt_name: default_find_select_open
139
156
  :env_var: MDE_DEFAULT_FIND_SELECT_OPEN
140
- :description: default_find_select_open
157
+ :description: Whether to search for files when a filename argument doesn't exist
141
158
  :arg_name: BOOL
142
159
  :default: true
143
160
  :procname: val_as_bool
144
161
  - :opt_name: dig
145
162
  :long_name: dig
146
- :description: Dig history (Present menu of history)
163
+ :description: Present interactive menu of execution history
147
164
  - :opt_name: display_level_xbase_prefix
148
165
  :env_var: MDE_DISPLAY_LEVEL_XBASE_PREFIX
166
+ :description: Text prefix prepended to output lines when display level is above
167
+ base level
149
168
  :default: "> "
150
169
  :procname: val_as_str
151
170
  - :opt_name: divider_match
@@ -201,6 +220,7 @@
201
220
  :procname: val_as_str
202
221
  - :opt_name: document_play_bin
203
222
  :env_var: MDE_DOCUMENT_PLAY_BIN
223
+ :description: Binary used for default block execution mode
204
224
  :default: play
205
225
  :procname: val_as_str
206
226
  - :opt_name: document_saved_lines_glob
@@ -218,56 +238,60 @@
218
238
  - :opt_name: dump_blocks_in_file
219
239
  :long_name: dump-blocks-in-file
220
240
  :env_var: MDE_DUMP_BLOCKS_IN_FILE
221
- :description: Dump BlocksInFile (stage 1)
241
+ :description: Display parsed blocks from file (debug/diagnostic output, stage 1)
222
242
  :arg_name: BOOL
223
243
  :default: false
224
244
  :procname: val_as_bool
225
245
  - :opt_name: dump_delegate_object
226
246
  :long_name: dump-delegate-object
227
247
  :env_var: MDE_DUMP_DELEGATE_OBJECT
228
- :description: Dump @delegate_object
248
+ :description: Display internal delegate object state (debug/diagnostic output)
229
249
  :arg_name: BOOL
230
250
  :default: false
231
251
  :procname: val_as_bool
232
252
  - :opt_name: dump_dependencies
233
253
  :long_name: dump-dependencies
234
254
  :env_var: MDE_DUMP_DEPENDENCIES
235
- :description: Dump dependencies
255
+ :description: Display block dependency relationships (debug/diagnostic output)
236
256
  :arg_name: BOOL
237
257
  :default: false
238
258
  :procname: val_as_bool
239
259
  - :opt_name: dump_inherited_block_names
240
260
  :long_name: dump-inherited-block-names
241
261
  :env_var: MDE_DUMP_INHERITED_BLOCK_NAMES
242
- :description: Dump inherited block_names
262
+ :description: Display inherited block names from imported documents (debug/diagnostic
263
+ output)
243
264
  :arg_name: BOOL
244
265
  :default: false
245
266
  :procname: val_as_bool
246
267
  - :opt_name: dump_inherited_dependencies
247
268
  :long_name: dump-inherited-dependencies
248
269
  :env_var: MDE_DUMP_INHERITED_DEPENDENCIES
249
- :description: Dump inherited dependencies
270
+ :description: Display inherited dependencies from imported documents (debug/diagnostic
271
+ output)
250
272
  :arg_name: BOOL
251
273
  :default: false
252
274
  :procname: val_as_bool
253
275
  - :opt_name: dump_inherited_lines
254
276
  :long_name: dump-inherited-lines
255
277
  :env_var: MDE_DUMP_INHERITED_LINES
256
- :description: Dump inherited lines
278
+ :description: Display inherited code lines from imported documents (debug/diagnostic
279
+ output)
257
280
  :arg_name: BOOL
258
281
  :default: false
259
282
  :procname: val_as_bool
260
283
  - :opt_name: dump_menu_blocks
261
284
  :long_name: dump-menu-blocks
262
285
  :env_var: MDE_DUMP_MENU_BLOCKS
263
- :description: Dump MenuBlocks (stage 2)
286
+ :description: Display blocks formatted for menu display (debug/diagnostic output,
287
+ stage 2)
264
288
  :arg_name: BOOL
265
289
  :default: false
266
290
  :procname: val_as_bool
267
291
  - :opt_name: dump_selected_block
268
292
  :long_name: dump-selected-block
269
293
  :env_var: MDE_DUMP_SELECTED_BLOCK
270
- :description: Dump selected block
294
+ :description: Display selected block details (debug/diagnostic output)
271
295
  :arg_name: BOOL
272
296
  :default: false
273
297
  :procname: val_as_bool
@@ -295,19 +319,19 @@
295
319
  :procname: val_as_str
296
320
  - :opt_name: exclude_by_name_regex
297
321
  :env_var: MDE_EXCLUDE_BY_NAME_REGEX
298
- :description: Exclude blocks with name matching
322
+ :description: Regex pattern to exclude blocks whose names match
299
323
  :arg_name: REGEX
300
324
  :default:
301
325
  :procname: val_as_str
302
326
  - :opt_name: exclude_by_shell_regex
303
327
  :env_var: MDE_EXCLUDE_BY_SHELL_REGEX
304
- :description: Exclude blocks with shell matching
328
+ :description: Regex pattern to exclude blocks whose shell type matches
305
329
  :arg_name: REGEX
306
330
  :default:
307
331
  :procname: val_as_str
308
332
  - :opt_name: exclude_expect_blocks
309
333
  :env_var: MDE_EXCLUDE_EXPECT_BLOCKS
310
- :description: Hide all blocks of type "expect"
334
+ :description: Whether to exclude all blocks of type "expect" from menus
311
335
  :arg_name: BOOL
312
336
  :default: true
313
337
  :procname: val_as_bool
@@ -352,20 +376,20 @@
352
376
  :procname: val_as_bool
353
377
  - :opt_name: execution_report_preview_frame_color
354
378
  :env_var: MDE_EXECUTION_REPORT_PREVIEW_FRAME_COLOR
355
- :description: execution_report_preview_frame_color
379
+ :description: Text color for the frame around execution report previews
356
380
  :default: fg_rgbh_90_e0_90
357
381
  :procname: val_as_str
358
382
  - :opt_name: execution_report_preview_head
359
383
  :env_var: MDE_EXECUTION_REPORT_PREVIEW_HEAD
360
- :description: execution_report_preview_head
384
+ :description: Text displayed before execution report preview content
361
385
  :procname: val_as_str
362
386
  - :opt_name: execution_report_preview_tail
363
- :description: execution_report_preview_tail
387
+ :description: Text displayed after execution report preview content
364
388
  :default: " -v-"
365
389
  :procname: val_as_str
366
390
  - :long_name: exit
367
391
  :short_name: x
368
- :description: Exit app
392
+ :description: Exit the application immediately
369
393
  :procname: exit
370
394
  - :opt_name: fenced_start_and_end_regex
371
395
  :env_var: MDE_FENCED_START_AND_END_REGEX
@@ -388,14 +412,15 @@
388
412
  :procname: val_as_str
389
413
  - :long_name: find
390
414
  :short_name: "?"
391
- :description: Find argument in documents
415
+ :description: Search for keyword across documents, block names, and file contents
392
416
  :arg_name: FIND
393
417
  :default: ''
394
418
  :procname: find
395
419
  - :opt_name: find_path
396
420
  :long_name: find-path
397
421
  :env_var: MDE_FIND_PATH
398
- :description: Path for find (uses PATH if empty)
422
+ :description: Directory path to search when using find command (uses path option
423
+ if empty)
399
424
  :arg_name: FIND_PATH
400
425
  :default: ''
401
426
  :procname: val_as_str
@@ -452,19 +477,24 @@
452
477
  :procname: val_as_str
453
478
  - :long_name: help
454
479
  :short_name: h
455
- :description: App help
480
+ :description: Display help message with usage and available options
456
481
  :procname: help
457
482
  - :opt_name: hide_blocks_by_name
458
483
  :env_var: MDE_HIDE_BLOCKS_BY_NAME
459
- :description: |-
460
- Exclude blocks with name matching expression " \
461
- "`block_name_hidden_match`
484
+ :description: Whether to hide blocks whose names match block_name_hide_custom_match
485
+ pattern
486
+ :arg_name: BOOL
487
+ :default: true
488
+ :procname: val_as_bool
489
+ - :opt_name: hide_shebang
490
+ :env_var: MDE_HIDE_SHEBANG
491
+ :description: Hide shebang lines in document output
462
492
  :arg_name: BOOL
463
493
  :default: true
464
494
  :procname: val_as_bool
465
495
  - :opt_name: history
466
496
  :long_name: history
467
- :description: History
497
+ :description: Display execution history (saved scripts and output files)
468
498
  - :opt_name: history_document_separator
469
499
  :env_var: MDE_HISTORY_DOCUMENT_SEPARATOR
470
500
  :default: "|"
@@ -475,45 +505,65 @@
475
505
  :procname: val_as_str
476
506
  - :long_name: how
477
507
  :short_name: "?"
478
- :description: Find keyword in YAML configuration options
508
+ :description: Search for keyword in YAML configuration option names and descriptions
479
509
  :arg_name: HOW
480
510
  :default: ''
481
511
  :procname: how
482
512
  - :opt_name: import_paths
483
513
  :env_var: MDE_IMPORT_PATHS
514
+ :description: Colon-separated list of directory paths to search when resolving imported
515
+ file names in @import directives
484
516
  :default:
485
517
  :procname: val_as_str
486
518
  - :opt_name: import_directive_line_pattern
487
519
  :env_var: MDE_IMPORT_PATTERN
520
+ :description: Regular expression pattern that matches @import directive lines, capturing
521
+ indentation, filename, and optional parameters
488
522
  :default: '^(?<indention> *)@import +(?<name>\S+)(?<params>(?: +\w+(?::(?:[ceqv]|[ceqv]{2})=|=)(?:"[^"]*"|''[^'']*''|\S+))*)
489
523
  *\\?$'
490
524
  :procname: val_as_str
491
525
  - :opt_name: import_directive_parameter_scan
492
526
  :env_var: MDE_IMPORT_PATTERN_SCAN
527
+ :description: Regular expression pattern that extracts individual parameters (key,
528
+ operator, value) from the params portion of an @import line
493
529
  :default: (\w+)(:[ceqv]{1,2}=|=)(?:"([^"]*)"|'([^']*)'|(\S+))
494
530
  :procname: val_as_str
495
531
  - :opt_name: import_parameter_variable_assignment
496
532
  :env_var: MDE_IMPORT_PARAMETER_VARIABLE_ASSIGNMENT
533
+ :description: Format string used to generate shell variable assignments when parameters
534
+ require command substitution or expression evaluation
497
535
  :default: "%{key}=%{value}"
498
536
  :procname: val_as_str
499
537
  - :opt_name: import_symbol_command_substitution
500
538
  :env_var: MDE_IMPORT_SYMBOL_COMMAND_SUBSTITUTION
539
+ :description: Symbol/operator (default ':c=') that indicates a parameter value should
540
+ be treated as a shell command to execute, using the command output as the substitution
541
+ value
501
542
  :default: ":c="
502
543
  :procname: val_as_str
503
544
  - :opt_name: import_symbol_evaluated_expression
504
545
  :env_var: MDE_IMPORT_SYMBOL_EVALUATED_EXPRESSION
546
+ :description: Symbol/operator (default ':e=') that indicates a parameter value should
547
+ be treated as a shell expression to evaluate with variable expansion
505
548
  :default: ":e="
506
549
  :procname: val_as_str
507
550
  - :opt_name: import_symbol_raw_literal
508
551
  :env_var: MDE_IMPORT_SYMBOL_RAW_LITERAL
552
+ :description: Symbol/operator (default '=') that indicates a parameter value should
553
+ be used as a raw literal string without any processing
509
554
  :default: "="
510
555
  :procname: val_as_str
511
556
  - :opt_name: import_symbol_force_quoted_literal
512
557
  :env_var: MDE_IMPORT_SYMBOL_FORCE_QUOTED_LITERAL
558
+ :description: Symbol/operator (default ':q=') that indicates a parameter value should
559
+ be treated as a literal string and automatically wrapped in double quotes during
560
+ substitution
513
561
  :default: ":q="
514
562
  :procname: val_as_str
515
563
  - :opt_name: import_symbol_variable_reference
516
564
  :env_var: MDE_IMPORT_SYMBOL_VARIABLE_REFERENCE
565
+ :description: Symbol/operator (default ':v=') that indicates a parameter value should
566
+ be treated as a reference to an existing variable from the importing document
517
567
  :default: ":v="
518
568
  :procname: val_as_str
519
569
  - :opt_name: line_decor_main
@@ -550,25 +600,26 @@
550
600
  :procname: val_as_str
551
601
  - :opt_name: list_blocks
552
602
  :long_name: list-blocks
553
- :description: List blocks
603
+ :description: List all available code blocks in the document
554
604
  - :opt_name: list_blocks_eval
555
605
  :long_name: list-blocks-eval
556
606
  :env_var: MDE_LIST_BLOCKS_EVAL
557
- :description: Eval block, supercedes Message, for report
607
+ :description: Ruby expression to evaluate on each block for list output (overrides
608
+ list-blocks-message)
558
609
  :arg_name: EVAL
559
610
  :default:
560
611
  :procname: val_as_str
561
612
  - :opt_name: list_blocks_message
562
613
  :long_name: list-blocks-message
563
614
  :env_var: MDE_LIST_BLOCKS_MESSAGE
564
- :description: Message to blocks, for report
615
+ :description: Block method or property to display for each block in list output
565
616
  :arg_name: MESSAGE
566
617
  :default: oname
567
618
  :procname: val_as_sym
568
619
  - :opt_name: list_blocks_type
569
620
  :long_name: list-blocks-type
570
621
  :env_var: MDE_LIST_BLOCKS_TYPE
571
- :description: Block type to report
622
+ :description: Filter blocks by type for list output (0=all, 1=bash, 2=ux, etc.)
572
623
  :arg_name: TYPE
573
624
  :default: 0
574
625
  :procname: val_as_int
@@ -581,31 +632,33 @@
581
632
  :procname: val_as_int
582
633
  - :opt_name: list_default_env
583
634
  :long_name: list-default-env
584
- :description: List default configuration as environment variables
635
+ :description: Display all default configuration options as environment variable
636
+ assignments
585
637
  - :opt_name: list_default_yaml
586
638
  :long_name: list-default-yaml
587
- :description: List default configuration as YAML
639
+ :description: Display all default configuration options in YAML format
588
640
  - :opt_name: list_docs
589
641
  :long_name: list-docs
590
- :description: List docs in current folder
642
+ :description: List all markdown documents in the current directory or specified
643
+ path
591
644
  - :opt_name: list_output_format
592
645
  :long_name: format
593
646
  :env_var: MDE_OUTPUT_LIST_FORMAT
594
- :description: Format for list
647
+ :description: Output format for list commands (text, json, yaml, etc.)
595
648
  :arg_name: FORMAT
596
649
  :default: text
597
650
  :procname: val_as_sym
598
651
  - :opt_name: list_recent_output
599
652
  :long_name: list-recent-output
600
- :description: List recent saved output
653
+ :description: List recently saved execution output files
601
654
  - :opt_name: list_recent_scripts
602
655
  :long_name: list-recent-scripts
603
- :description: List recent saved scripts
656
+ :description: List recently saved executed scripts
604
657
  - :opt_name: load_code
605
658
  :long_name: load-code
606
659
  :short_name: l
607
660
  :env_var: MDE_LOAD_CODE
608
- :description: Load code
661
+ :description: Load code from external file into document context as inherited lines
609
662
  :arg_name: PATH
610
663
  :default: ''
611
664
  :procname: val_as_str
@@ -630,7 +683,7 @@
630
683
  :procname: val_as_str
631
684
  - :opt_name: menu_active_color_pastel_messages
632
685
  :env_var: MDE_MENU_ACTIVE_COLOR_PASTEL_MESSAGES
633
- :description: menu_active_color_pastel_messages
686
+ :description: Pastel color methods to apply to active menu item text
634
687
  :default:
635
688
  - inverse
636
689
  - :opt_name: menu_back_at_top
@@ -674,12 +727,12 @@
674
727
  :procname: val_as_str
675
728
  - :opt_name: menu_collapsible_symbol_collapsed
676
729
  :env_var: MDE_MENU_COLLAPSIBLE_SYMBOL_COLLAPSED
677
- :description: menu_collapsible_symbol_collapsed
730
+ :description: Symbol displayed for collapsed collapsible menu items
678
731
  :default: "⬢"
679
732
  :procname: val_as_str
680
733
  - :opt_name: menu_collapsible_symbol_expanded
681
- :env_var: MDE_MENU_COLLAPSIBLE_SYMBOL_expandED
682
- :description: menu_collapsible_symbol_expanded
734
+ :env_var: MDE_MENU_COLLAPSIBLE_SYMBOL_EXPANDED
735
+ :description: Symbol displayed for expanded collapsible menu items
683
736
  :default: "⬡"
684
737
  :procname: val_as_str
685
738
  - :opt_name: menu_divider_color
@@ -1007,7 +1060,8 @@
1007
1060
  :procname: val_as_bool
1008
1061
  - :opt_name: mine
1009
1062
  :long_name: mine
1010
- :description: Mine history (List lines matched by probe)
1063
+ :description: Display matching lines from execution history files when used with
1064
+ probe pattern
1011
1065
  - :opt_name: no_chrome
1012
1066
  :env_var: MDE_NO_CHROME
1013
1067
  :description: Hide decorative menu entries
@@ -1016,18 +1070,20 @@
1016
1070
  :procname: val_as_bool
1017
1071
  - :long_name: open
1018
1072
  :short_name: o
1019
- :description: Find argument in documents, present list, and open user selection
1073
+ :description: Search for keyword in documents, present selection menu, and open
1074
+ chosen document
1020
1075
  :arg_name: OPEN
1021
1076
  :default: ''
1022
1077
  :procname: open
1023
1078
  - :opt_name: option_expansion_expression_regexp
1024
1079
  :env_var: MDE_OPTION_EXPANSION_EXPRESSION_REGEXP
1025
- :description: option_expansion_expression_regexp
1080
+ :description: Regex pattern that matches option expansions (e.g., &{option.property})
1026
1081
  :default: "(?<expression>&{(?<payload>(?<option>[A-Z0-9a-z_]+)(?:\\.(?<property>[A-Z0-9a-z_]+))?)})"
1027
1082
  :procname: val_as_str
1028
1083
  - :opt_name: option_expansion_payload_regexp
1029
1084
  :env_var: MDE_OPTION_EXPANSION_PAYLOAD_REGEXP
1030
- :description: option_expansion_payload_regexp
1085
+ :description: Regex pattern that extracts the option and property names from option
1086
+ expansion payloads
1031
1087
  :default: "^(?<option>[A-Z0-9a-z_]+)(?:\\.(?<property>[A-Z0-9a-z_]+))?$"
1032
1088
  :procname: val_as_str
1033
1089
  - :opt_name: output_assignment_begin
@@ -1118,16 +1174,19 @@
1118
1174
  :procname: val_as_bool
1119
1175
  - :opt_name: play_bin_batch
1120
1176
  :env_var: MDE_PLAY_BIN_BATCH
1177
+ :description: Binary used for batch mode block execution
1121
1178
  :default: play
1122
1179
  :procname: val_as_str
1123
1180
  - :opt_name: play_bin_interactive
1124
1181
  :env_var: MDE_PLAY_BIN_INTERACTIVE
1182
+ :description: Binary used for interactive mode block execution
1125
1183
  :default: play_interactive
1126
1184
  :procname: val_as_str
1127
1185
  - :opt_name: probe
1128
1186
  :long_name: probe
1129
1187
  :env_var: MDE_PROBE
1130
- :description: Probe history (Filter history to files with lines matching a pattern)
1188
+ :description: Filter execution history to files containing lines matching the specified
1189
+ pattern
1131
1190
  :procname: val_as_str
1132
1191
  - :opt_name: prompt_after_script_execution
1133
1192
  :env_var: MDE_PROMPT_AFTER_SCRIPT_EXECUTION
@@ -1182,7 +1241,7 @@
1182
1241
  :procname: val_as_str
1183
1242
  - :opt_name: prompt_margin_left_text
1184
1243
  :env_var: MDE_PROMPT_MARGIN_LEFT_TEXT
1185
- :description: prompt_margin_left_text
1244
+ :description: Text prefix displayed at the left margin of prompts
1186
1245
  :default: "» "
1187
1246
  :procname: val_as_str
1188
1247
  - :opt_name: prompt_no
@@ -1237,7 +1296,7 @@
1237
1296
  :procname: val_as_str
1238
1297
  - :opt_name: prompt_show_expr_format
1239
1298
  :env_var: MDE_PROMPT_SHOW_EXPR_FORMAT
1240
- :description: prompt_show_expr_format
1299
+ :description: Format string for displaying expression values in prompts
1241
1300
  :default: 'Expr: %{expr}'
1242
1301
  :procname: val_as_str
1243
1302
  - :opt_name: prompt_uninterrupted
@@ -1252,24 +1311,25 @@
1252
1311
  :procname: val_as_str
1253
1312
  - :opt_name: publish_block_name_format
1254
1313
  :env_var: MDE_PUBLISH_BLOCK_NAME_FORMAT
1255
- :description: format for block name published
1314
+ :description: Format string for block execution events published to file
1256
1315
  :default: "%{time} Blc %{document} / %{block}\n"
1257
1316
  :procname: val_as_str
1258
1317
  - :opt_name: publish_document_file_mode
1259
1318
  :long_name: publish-document-file-mode
1260
1319
  :env_var: MDE_PUBLISH_DOCUMENT_FILE_MODE
1261
- :description: Published file mode (fifo/append/write)
1320
+ :description: File mode for publishing document events (fifo=pipe, append=append
1321
+ to file, write=overwrite file)
1262
1322
  :default: fifo
1263
1323
  :procname: val_as_str
1264
1324
  - :opt_name: publish_document_file_name
1265
1325
  :long_name: publish-document-file-name
1266
1326
  :env_var: MDE_PUBLISH_DOCUMENT_FILE_NAME
1267
- :description: File path for publishing
1327
+ :description: File path where document execution events are published
1268
1328
  :default: ''
1269
1329
  :procname: val_as_str
1270
1330
  - :opt_name: publish_document_name_format
1271
1331
  :env_var: MDE_PUBLISH_DOCUMENT_NAME_FORMAT
1272
- :description: format for document name published
1332
+ :description: Format string for document load events published to file
1273
1333
  :default: "%{time} Doc %{document}\n"
1274
1334
  :procname: val_as_str
1275
1335
  - :opt_name: publish_time_format
@@ -1380,19 +1440,19 @@
1380
1440
  :procname: val_as_str
1381
1441
  - :opt_name: script_execution_frame_color
1382
1442
  :env_var: MDE_SCRIPT_EXECUTION_FRAME_COLOR
1383
- :description: script_execution_frame_color
1443
+ :description: Text color for the frame around script execution output
1384
1444
  :default: fg_rgbh_80_d0_a0
1385
1445
  :procname: val_as_str
1386
1446
  - :opt_name: script_execution_head
1387
1447
  :env_var: MDE_SCRIPT_EXECUTION_HEAD
1388
- :description: script_execution_head
1448
+ :description: Text displayed before script execution output
1389
1449
  :default: |2-
1390
1450
 
1391
1451
  -^-
1392
1452
  :procname: val_as_str
1393
1453
  - :opt_name: script_execution_tail
1394
1454
  :env_var: MDE_SCRIPT_EXECUTION_TAIL
1395
- :description: script_execution_tail
1455
+ :description: Text displayed after script execution output
1396
1456
  :default: " -v-\n"
1397
1457
  :procname: val_as_str
1398
1458
  - :opt_name: script_preview_frame_color
@@ -1402,25 +1462,25 @@
1402
1462
  :procname: val_as_str
1403
1463
  - :opt_name: script_preview_head
1404
1464
  :env_var: MDE_SCRIPT_PREVIEW_HEAD
1405
- :description: script_preview_head
1465
+ :description: Text displayed before script preview content
1406
1466
  :default: |2-
1407
1467
 
1408
1468
  -^-
1409
1469
  :procname: val_as_str
1410
1470
  - :opt_name: script_preview_tail
1411
1471
  :env_var: MDE_SCRIPT_PREVIEW_TAIL
1412
- :description: script_preview_tail
1472
+ :description: Text displayed after script preview content
1413
1473
  :default: " -v-\n"
1414
1474
  :procname: val_as_str
1415
1475
  - :opt_name: select_by_name_regex
1416
1476
  :env_var: MDE_SELECT_BY_NAME_REGEX
1417
- :description: Select blocks with name matching
1477
+ :description: Regex pattern to include only blocks whose names match
1418
1478
  :arg_name: REGEX
1419
1479
  :default:
1420
1480
  :procname: val_as_str
1421
1481
  - :opt_name: select_by_shell_regex
1422
1482
  :env_var: MDE_SELECT_BY_SHELL_REGEX
1423
- :description: Select blocks with shell matching
1483
+ :description: Regex pattern to include only blocks whose shell type matches
1424
1484
  :arg_name: REGEX
1425
1485
  :default:
1426
1486
  :procname: val_as_str
@@ -1452,12 +1512,14 @@
1452
1512
  :procname: val_as_str
1453
1513
  - :opt_name: shell_code_label_format_above
1454
1514
  :env_var: MDE_SHELL_CODE_LABEL_FORMAT_ABOVE
1455
- :description: shell_code_label_format_above
1515
+ :description: Format string for label text displayed above code blocks in generated
1516
+ scripts
1456
1517
  :default:
1457
1518
  :procname: val_as_str
1458
1519
  - :opt_name: shell_code_label_format_below
1459
1520
  :env_var: MDE_SHELL_CODE_LABEL_FORMAT_BELOW
1460
- :description: shell_code_label_format_below
1521
+ :description: Format string for label text displayed below code blocks in generated
1522
+ scripts
1461
1523
  :default:
1462
1524
  :procname: val_as_str
1463
1525
  - :opt_name: shell_code_label_time_format
@@ -1474,11 +1536,11 @@
1474
1536
  - :opt_name: sift
1475
1537
  :long_name: sift
1476
1538
  :env_var: MDE_SIFT
1477
- :description: Sift history (Filter history to file names matching a pattern)
1539
+ :description: Filter execution history to file names matching the specified pattern
1478
1540
  :procname: val_as_str
1479
1541
  - :opt_name: tab_completions
1480
1542
  :long_name: tab-completions
1481
- :description: List tab completions
1543
+ :description: List available tab completion options for shell integration
1482
1544
  - :opt_name: table_border_color
1483
1545
  :env_var: MDE_TABLE_BORDER_COLOR
1484
1546
  :description: Color for table border
@@ -1547,17 +1609,20 @@
1547
1609
  :procname: val_as_bool
1548
1610
  - :opt_name: ux_auto_load_force_default
1549
1611
  :env_var: MDE_UX_AUTO_LOAD_FORCE_DEFAULT
1612
+ :description: Whether to force default values for UX blocks during auto-load, even
1613
+ if variables already exist
1550
1614
  :arg_name: BOOL
1551
1615
  :default: true
1552
1616
  :procname: val_as_bool
1553
1617
  - :opt_name: variable_expansion_name_capture_group
1554
1618
  :env_var: MDE_VARIABLE_EXPANSION_NAME_CAPTURE_GROUP
1555
- :description: variable_expansion_name_capture_group
1619
+ :description: Named capture group name that extracts the variable name from variable
1620
+ expansion matches
1556
1621
  :default: variable
1557
1622
  :procname: val_as_str
1558
1623
  - :opt_name: variable_expansion_regexp
1559
1624
  :env_var: MDE_VARIABLE_EXPANSION_REGEXP
1560
- :description: variable_expansion_regexp
1625
+ :description: Regex pattern that matches variable expansions (e.g., ${variable})
1561
1626
  :default: "(?<expression>\\${(?<variable>[A-Z0-9a-z_]+)})"
1562
1627
  :procname: val_as_str
1563
1628
  - :opt_name: vars_block_filename_view
@@ -1567,8 +1632,9 @@
1567
1632
  :default: "%{base}"
1568
1633
  :procname: val_as_str
1569
1634
  - :opt_name: vars_block_filename_pattern
1570
- :env_var: MDE_VARS_BLOCK_filename_pattern
1571
- :description: vars_block_filename_pattern
1635
+ :env_var: MDE_VARS_BLOCK_FILENAME_PATTERN
1636
+ :description: Regex pattern that parses filenames into path, base, and extension
1637
+ components for vars blocks
1572
1638
  :arg_name: PATTERN
1573
1639
  :default: "^(?<path>.*/)(?<base>[^/]+?)(?<extension>\\.?[^./]*)?$"
1574
1640
  :procname: val_as_str