markdown_exec 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +2 -2
- data/Rakefile +3 -3
- data/bats/block-types.bats +13 -7
- data/bats/import.bats +6 -0
- data/bats/markup.bats +6 -15
- data/bats/options-collapse.bats +26 -0
- data/bats/options.bats +1 -1
- data/bats/table.bats +8 -0
- data/bats/test_helper.bash +74 -49
- data/bats/variable-expansion.bats +46 -0
- data/bin/tab_completion.sh +1 -1
- data/docs/dev/bats-document-configuration.md +8 -1
- data/docs/dev/block-type-bash.md +1 -1
- data/docs/dev/block-type-opts.md +1 -5
- data/docs/dev/block-type-vars.md +4 -0
- data/docs/dev/import-missing.md +2 -0
- data/docs/dev/menu-cli.md +1 -1
- data/docs/dev/options-collapse.md +47 -0
- data/docs/dev/requiring-blocks.md +3 -0
- data/docs/dev/specs.md +2 -1
- data/docs/dev/table-crash.md +39 -0
- data/docs/dev/table-indent.md +26 -0
- data/docs/dev/text-decoration.md +2 -5
- data/docs/dev/variable-expansion.md +2 -4
- data/examples/bash-blocks.md +1 -1
- data/examples/block-names.md +1 -1
- data/examples/block-types.md +1 -1
- data/examples/data-files.md +1 -1
- data/examples/document_options.md +2 -2
- data/examples/indent.md +1 -1
- data/examples/interrupt.md +1 -1
- data/examples/link-blocks-vars.md +1 -1
- data/examples/linked.md +1 -1
- data/examples/linked1.md +1 -1
- data/examples/nickname.md +1 -1
- data/examples/opts-blocks-require.md +1 -1
- data/examples/opts-blocks.md +1 -1
- data/examples/opts_output_execution.md +1 -1
- data/examples/pass-through-arguments.md +1 -1
- data/examples/pause-after-execution.md +1 -1
- data/examples/port-blocks.md +1 -1
- data/examples/save.md +1 -1
- data/examples/text-markup.md +1 -1
- data/examples/variable-expansion.md +6 -2
- data/examples/vars-blocks.md +1 -1
- data/examples/wrap.md +1 -1
- data/lib/block_types.rb +4 -0
- data/lib/cached_nested_file_reader.rb +7 -4
- data/lib/collapser.rb +302 -0
- data/lib/constants.rb +10 -0
- data/lib/evaluate_shell_expressions.rb +0 -3
- data/lib/fcb.rb +13 -17
- data/lib/format_table.rb +11 -7
- data/lib/hash_delegator.rb +461 -272
- data/lib/hierarchy_string.rb +5 -1
- data/lib/markdown_exec/version.rb +1 -1
- data/lib/markdown_exec.rb +16 -32
- data/lib/mdoc.rb +100 -35
- data/lib/menu.src.yml +124 -17
- data/lib/menu.yml +102 -16
- data/lib/ww.rb +75 -22
- metadata +12 -9
- data/lib/append_to_bash_history.rb +0 -303
- data/lib/ce_get_cost_and_usage.rb +0 -23
- data/lib/doh.rb +0 -190
- data/lib/layered_hash.rb +0 -143
- data/lib/poly.rb +0 -171
data/lib/hierarchy_string.rb
CHANGED
@@ -30,7 +30,7 @@ class HierarchyString
|
|
30
30
|
attr_accessor :substrings
|
31
31
|
|
32
32
|
# Initialize with a single hash or an array of hashes
|
33
|
-
def initialize(substrings, text_sym: :text, style_sym: :color)
|
33
|
+
def initialize(substrings = [], text_sym: :text, style_sym: :color)
|
34
34
|
@substrings = parse_substrings(substrings)
|
35
35
|
@text_sym = text_sym
|
36
36
|
@style_sym = style_sym
|
@@ -82,6 +82,10 @@ class HierarchyString
|
|
82
82
|
decorate_substrings(@substrings)
|
83
83
|
end
|
84
84
|
|
85
|
+
def padded_width
|
86
|
+
concatenate.length
|
87
|
+
end
|
88
|
+
|
85
89
|
# Handle string inspection methods and pass them to the concatenated string
|
86
90
|
def method_missing(method_name, *arguments, &block)
|
87
91
|
if ''.respond_to?(method_name)
|
data/lib/markdown_exec.rb
CHANGED
@@ -15,7 +15,6 @@ require 'tty-prompt'
|
|
15
15
|
require 'yaml'
|
16
16
|
|
17
17
|
require_relative 'ansi_formatter'
|
18
|
-
# require_relative 'block_label'
|
19
18
|
require_relative 'cached_nested_file_reader'
|
20
19
|
require_relative 'cli'
|
21
20
|
require_relative 'color_scheme'
|
@@ -94,6 +93,7 @@ class NamedCaptureExtractor
|
|
94
93
|
regexp = pattern.is_a?(Regexp) ? pattern : Regexp.new(pattern)
|
95
94
|
str&.match(regexp)&.named_captures&.transform_keys(&:to_sym)
|
96
95
|
end
|
96
|
+
|
97
97
|
def self.extract_named_group2(match_data)
|
98
98
|
match_data&.named_captures&.transform_keys(&:to_sym)
|
99
99
|
end
|
@@ -415,14 +415,10 @@ module MarkdownExec
|
|
415
415
|
options = calculated_options.merge(options)
|
416
416
|
update_options(options, over: false)
|
417
417
|
# recognize commands with an opt_name, no procname
|
418
|
-
# !!b
|
419
418
|
return if execute_simple_commands(options, stage: 1)
|
420
|
-
# !!b
|
421
419
|
|
422
420
|
mde_vux_main_loop(opts_prepare_file_list(options))
|
423
|
-
# !!b
|
424
421
|
return unless @options[:output_saved_script_filename]
|
425
|
-
# !!b
|
426
422
|
|
427
423
|
@fout.fout "script_block_name: #{run_state.script_block_name}"
|
428
424
|
@fout.fout "s_save_filespec: #{run_state.saved_filespec}"
|
@@ -433,16 +429,10 @@ module MarkdownExec
|
|
433
429
|
# !!p stage
|
434
430
|
simple_commands(options).each do |key, (cstage, proc)|
|
435
431
|
if @options[key].is_a?(TrueClass) || @options[key].present?
|
436
|
-
# !!v key, 'cstage', cstage
|
437
432
|
if stage && stage == cstage
|
438
|
-
# !!b
|
439
433
|
proc.call
|
440
434
|
return true
|
441
|
-
else
|
442
|
-
# !!b
|
443
435
|
end
|
444
|
-
else
|
445
|
-
# !!b
|
446
436
|
end
|
447
437
|
end
|
448
438
|
false
|
@@ -584,7 +574,7 @@ module MarkdownExec
|
|
584
574
|
|
585
575
|
files_table_rows = @options.read_saved_assets_for_history_table(
|
586
576
|
asset: @options[:filename]
|
587
|
-
)
|
577
|
+
)
|
588
578
|
if sift_regexp
|
589
579
|
# Filter history to file names matching a pattern
|
590
580
|
files_table_rows.select! { |item| sift_regexp.match(item[:file]) }
|
@@ -816,20 +806,14 @@ module MarkdownExec
|
|
816
806
|
|
817
807
|
# Reports and executes block logic
|
818
808
|
def mde_vux_main_loop(files)
|
819
|
-
# !!b
|
820
809
|
@options[:filename] = select_document_if_multiple(files)
|
821
810
|
@options.vux_main_loop do |type, data|
|
822
811
|
case type
|
823
812
|
when :command_names
|
824
|
-
# !!b
|
825
813
|
simple_commands(data).keys
|
826
814
|
when :call_proc
|
827
|
-
# !!b
|
828
|
-
# simple_commands(data[0])[data[1]].call
|
829
815
|
simple_commands(data[0])[data[1]][1].call
|
830
|
-
|
831
816
|
when :end_of_cli
|
832
|
-
# !!b
|
833
817
|
execute_simple_commands(options, stage: 2)
|
834
818
|
else
|
835
819
|
raise
|
@@ -1041,21 +1025,21 @@ module MarkdownExec
|
|
1041
1025
|
list_default_yaml: [1, -> { @fout.fout_list list_default_yaml }],
|
1042
1026
|
list_docs: [1, -> { @fout.fout_list opts_prepare_file_list(options) }],
|
1043
1027
|
list_recent_output: [1, -> {
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1028
|
+
@fout.fout_list list_recent_output(
|
1029
|
+
@options[:saved_stdout_folder],
|
1030
|
+
@options[:saved_stdout_glob], @options[:list_count]
|
1031
|
+
)
|
1032
|
+
}],
|
1049
1033
|
list_recent_scripts: [1, -> {
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
menu_export: [1, -> {@fout.fout menu_export }],
|
1056
|
-
pwd: [1, -> {@fout.fout File.expand_path('..', __dir__) }],
|
1057
|
-
run_last_script: [1, -> {run_last_script }],
|
1058
|
-
tab_completions: [1, -> {@fout.fout tab_completions }]
|
1034
|
+
@fout.fout_list list_recent_scripts(
|
1035
|
+
options[:saved_script_folder],
|
1036
|
+
options[:saved_script_glob], options[:list_count]
|
1037
|
+
)
|
1038
|
+
}],
|
1039
|
+
menu_export: [1, -> { @fout.fout menu_export }],
|
1040
|
+
pwd: [1, -> { @fout.fout File.expand_path('..', __dir__) }],
|
1041
|
+
run_last_script: [1, -> { run_last_script }],
|
1042
|
+
tab_completions: [1, -> { @fout.fout tab_completions }]
|
1059
1043
|
}
|
1060
1044
|
end
|
1061
1045
|
|
data/lib/mdoc.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# encoding=utf-8
|
5
5
|
|
6
6
|
require_relative 'block_types'
|
7
|
+
require_relative 'collapser'
|
7
8
|
require_relative 'filter'
|
8
9
|
|
9
10
|
$pd = false unless defined?($pd)
|
@@ -206,27 +207,114 @@ module MarkdownExec
|
|
206
207
|
|
207
208
|
### hide rows correctly
|
208
209
|
|
209
|
-
unless
|
210
|
-
selrows = selrows.reject do |
|
211
|
-
|
210
|
+
unless opts[:menu_include_imported_blocks]
|
211
|
+
selrows = selrows.reject do |fcb|
|
212
|
+
fcb.fetch(:depth, 0).positive?
|
212
213
|
end
|
213
214
|
end
|
214
215
|
|
215
216
|
if opts[:hide_blocks_by_name]
|
216
|
-
selrows = selrows.reject do |
|
217
|
-
hide_menu_block_on_name
|
217
|
+
selrows = selrows.reject do |fcb|
|
218
|
+
hide_menu_block_on_name(opts, fcb)
|
218
219
|
end
|
219
220
|
end
|
220
221
|
|
222
|
+
collapser = Collapser.new(
|
223
|
+
options: opts, state: opts[:compressed_ids] || {}
|
224
|
+
)
|
225
|
+
selrows = collapser.reject(selrows, initialize: opts[:compressed_ids].nil?) do |fcb, hide, collapsed_level|
|
226
|
+
# update fcb per state
|
227
|
+
if fcb.collapsible
|
228
|
+
fcb.s1decorated = fcb.s1decorated + ' ' + (fcb.collapse ? opts[:menu_collapsible_symbol_collapsed] : opts[:menu_collapsible_symbol_expanded])
|
229
|
+
end
|
230
|
+
end
|
231
|
+
opts[:compressed_ids] = collapser.state
|
232
|
+
|
221
233
|
# remove
|
222
234
|
# . empty chrome between code; edges are same as blanks
|
223
235
|
#
|
224
|
-
|
225
|
-
|
226
|
-
!(!
|
227
|
-
prev_element.
|
228
|
-
|
229
|
-
|
236
|
+
[
|
237
|
+
select_elements_with_neighbor_conditions(selrows) do |prev_element, current, next_element|
|
238
|
+
!(current[:chrome] && !current.oname.present?) ||
|
239
|
+
!(!prev_element.nil? &&
|
240
|
+
prev_element.shell.present? &&
|
241
|
+
!next_element.nil? &&
|
242
|
+
next_element.shell.present?)
|
243
|
+
end,
|
244
|
+
opts[:compressed_ids]
|
245
|
+
]
|
246
|
+
end
|
247
|
+
|
248
|
+
# Filters out blocks that are nested within a hierarchy of "hidden" blocks.
|
249
|
+
#
|
250
|
+
# The method iterates over selected rows and uses a callback block to determine if a given block
|
251
|
+
# should trigger hiding for subsequent blocks in the hierarchy. Once hiding is triggered, all
|
252
|
+
# blocks with a level greater than the triggering block's level are excluded until the next
|
253
|
+
# visible collapsible block.
|
254
|
+
#
|
255
|
+
# @param selrows [Array] The array of selected rows to filter based on the callback's results.
|
256
|
+
# @param callback [Lambda/Proc] Alternate to yield block.
|
257
|
+
# @param collapsible_types [Array] Types to select, nil for all.
|
258
|
+
# @yield [block] A callback to evaluate each block; should return true to initiate hiding.
|
259
|
+
# @return [Array] Filtered list of rows, excluding those hidden by hierarchical hiding rules.
|
260
|
+
#
|
261
|
+
# Example:
|
262
|
+
# proc_condition = Proc.new { |fcb| fcb.type == BlockType::HEADING && fcb.level == 1 }
|
263
|
+
# reject_collapsed_blocks(selrows, callback: proc_condition)
|
264
|
+
#
|
265
|
+
# lambda_condition = ->(fcb) { fcb.type == BlockType::HEADING && fcb.level == 1 }
|
266
|
+
# reject_collapsed_blocks(selrows, callback: lambda_condition)
|
267
|
+
#
|
268
|
+
# Block: Exits the enclosing method (test_with_block) if return is used.
|
269
|
+
# Flexible with arguments
|
270
|
+
# Proc: Exits the enclosing method (test_with_proc) when return is encountered, similar to a block.
|
271
|
+
# Lambda: Only exits the lambda itself, allowing reject_collapsed_blocks to continue execution.
|
272
|
+
# Stricter argument checking.
|
273
|
+
#
|
274
|
+
# **`lambda` provides more control** and avoids the early exit behavior caused by `return` in blocks or `Proc` objects, making it a safer choice when you want `reject_collapsed_blocks` to complete its execution regardless of the callback’s behavior.
|
275
|
+
def reject_collapsed_blocks(
|
276
|
+
selrows,
|
277
|
+
callback: nil,
|
278
|
+
reject_callback: nil,
|
279
|
+
collapsible_types: nil,
|
280
|
+
&block
|
281
|
+
)
|
282
|
+
block ||= callback # Use callback if no block is provided
|
283
|
+
hiding = false # State to indicate if hiding is active
|
284
|
+
hidden_level = nil # Level at which hiding was triggered
|
285
|
+
|
286
|
+
selrows.reject do |fcb| # Reject rows that should be hidden based on the hierarchy
|
287
|
+
if hiding
|
288
|
+
# Currently in hiding mode; evaluate if the current block should remain hidden
|
289
|
+
if collapsible_types.nil? || collapsible_types.include?(fcb.type)
|
290
|
+
if hidden_level.nil?
|
291
|
+
# No specific hidden level yet, allow the item to show
|
292
|
+
false
|
293
|
+
elsif fcb.level > hidden_level
|
294
|
+
reject_callback.call(fcb, ) if reject_callback
|
295
|
+
# The current block is at a deeper level and thus remains hidden
|
296
|
+
true
|
297
|
+
else
|
298
|
+
# At the same or higher level than hidden_level, check if the callback initiates hiding again
|
299
|
+
hiding = block.call(fcb)
|
300
|
+
hidden_level = fcb.level if hiding # Update hidden level if hiding continues
|
301
|
+
false # Do not hide the initiating block itself
|
302
|
+
end
|
303
|
+
else
|
304
|
+
reject_callback.call(fcb) if reject_callback
|
305
|
+
# Non-collapsible block types (e.g., text or note) continue hiding by default
|
306
|
+
true
|
307
|
+
end
|
308
|
+
|
309
|
+
elsif block.call(fcb)
|
310
|
+
# If callback triggers hiding, initialize hiding state and hidden_level
|
311
|
+
hiding = fcb.type # Start hiding subsequent blocks
|
312
|
+
hidden_level = fcb.level # Define the hierarchical level for hiding
|
313
|
+
false # Do not hide the initiating block itself
|
314
|
+
|
315
|
+
else
|
316
|
+
false # Default: do not hide if no hiding state
|
317
|
+
end
|
230
318
|
end
|
231
319
|
end
|
232
320
|
|
@@ -416,29 +504,6 @@ module MarkdownExec
|
|
416
504
|
|
417
505
|
selected_elements
|
418
506
|
end
|
419
|
-
|
420
|
-
# def select_elements_with_neighbor_conditions(array)
|
421
|
-
# # This function filters elements from the array where the current element has property A set to true
|
422
|
-
# # and both the previous and next elements have property B set to true.
|
423
|
-
# selected_elements = []
|
424
|
-
|
425
|
-
# array.each_with_index do |element, index|
|
426
|
-
# next if index.zero? # Skip the first element since it has no previous element
|
427
|
-
# break if index >= array.size - 1 # Break before the last to avoid out-of-bound errors
|
428
|
-
|
429
|
-
# prev_element = array[index - 1]
|
430
|
-
# next_element = array[index + 1]
|
431
|
-
|
432
|
-
# # Check the conditions for property A on the current element and property B on adjacent elements
|
433
|
-
# unless element[:chrome] && !element[:oname].present? && prev_element.shell.present? && next_element.shell.present?
|
434
|
-
# selected_elements << element
|
435
|
-
# # else
|
436
|
-
# # pp 'SKIPPING', element
|
437
|
-
# end
|
438
|
-
# end
|
439
|
-
|
440
|
-
# selected_elements
|
441
|
-
# end
|
442
507
|
end
|
443
508
|
end
|
444
509
|
|
@@ -540,7 +605,7 @@ if $PROGRAM_NAME == __FILE__
|
|
540
605
|
|
541
606
|
def test_fcbs_per_options
|
542
607
|
opts = { hide_blocks_by_name: true, block_name_hidden_match: 'block1' }
|
543
|
-
result = @doc.fcbs_per_options(opts)
|
608
|
+
result, _ = @doc.fcbs_per_options(opts)
|
544
609
|
assert_equal [@table[1], @table[2]], result
|
545
610
|
end if false ### broken test
|
546
611
|
|
data/lib/menu.src.yml
CHANGED
@@ -11,6 +11,11 @@
|
|
11
11
|
:default: false
|
12
12
|
:procname: val_as_bool
|
13
13
|
|
14
|
+
- :opt_name: block_batch_match
|
15
|
+
:env_var: MDE_BLOCK_BATCH_MATCH
|
16
|
+
:default: '@batch'
|
17
|
+
:procname: val_as_str
|
18
|
+
|
14
19
|
- :opt_name: block_calls_scan
|
15
20
|
:env_var: MDE_BLOCK_CALLS_SCAN
|
16
21
|
:default: "%\\([^\\)]+\\)"
|
@@ -21,6 +26,11 @@
|
|
21
26
|
:default: '@disable'
|
22
27
|
:procname: val_as_str
|
23
28
|
|
29
|
+
- :opt_name: block_interactive_match
|
30
|
+
:env_var: MDE_BLOCK_INTERACTIVE_MATCH
|
31
|
+
:default: '@interactive'
|
32
|
+
:procname: val_as_str
|
33
|
+
|
24
34
|
- :opt_name: block_name
|
25
35
|
:long_name: block-name
|
26
36
|
:short_name: b
|
@@ -92,6 +102,12 @@
|
|
92
102
|
:default: true
|
93
103
|
:procname: val_as_bool
|
94
104
|
|
105
|
+
# - :opt_name: command_substitution_regexp
|
106
|
+
# :env_var: MDE_COMMAND_SUBSTITUTION_REGEXP
|
107
|
+
# :description: command_substitution_regexp
|
108
|
+
# :default: "(?<expression>\\$\\((?<variable>[A-Z0-9a-z_]+)\\))"
|
109
|
+
# :procname: val_as_str
|
110
|
+
|
95
111
|
- :long_name: config
|
96
112
|
:description: Read configuration file
|
97
113
|
:arg_name: PATH
|
@@ -136,6 +152,27 @@
|
|
136
152
|
:default: "> "
|
137
153
|
:procname: val_as_str
|
138
154
|
|
155
|
+
- :opt_name: divider_match
|
156
|
+
:env_var: MDE_DIVIDER_MATCH
|
157
|
+
:description: Pattern for topics/dividers in block selection menu
|
158
|
+
:default: "^(?<indent>[ \t]*):::(?<collapse>[+-~]?)(?<leading>[ \t]*)(?<line>(?<text>.*?)(?<trailing>[ \t]*))?$"
|
159
|
+
:procname: val_as_str
|
160
|
+
|
161
|
+
- :opt_name: divider4_center
|
162
|
+
:env_var: MDE_DIVIDER4_CENTER
|
163
|
+
:default: true
|
164
|
+
:procname: val_as_bool
|
165
|
+
|
166
|
+
- :opt_name: divider4_collapse
|
167
|
+
:env_var: MDE_DIVIDER_COLLAPSE
|
168
|
+
:default: false
|
169
|
+
:procname: val_as_bool
|
170
|
+
|
171
|
+
- :opt_name: divider4_collapsible
|
172
|
+
:env_var: MDE_DIVIDER_COLLAPSIBLE
|
173
|
+
:default: true
|
174
|
+
:procname: val_as_bool
|
175
|
+
|
139
176
|
- :opt_name: document_configurations_directory
|
140
177
|
:env_var: MDE_DOCUMENT_CONFIGURATIONS_DIRECTORY
|
141
178
|
:description: Directory with files
|
@@ -160,7 +197,18 @@
|
|
160
197
|
- :opt_name: document_load_opts_block_name
|
161
198
|
:env_var: MDE_DOCUMENT_LOAD_OPTS_BLOCK_NAME
|
162
199
|
:description: Name of Opts block to load with the document
|
163
|
-
:default: "(
|
200
|
+
:default: "(document_opts)"
|
201
|
+
:procname: val_as_str
|
202
|
+
|
203
|
+
- :opt_name: document_load_vars_block_name
|
204
|
+
:env_var: MDE_DOCUMENT_LOAD_VARS_BLOCK_NAME
|
205
|
+
:description: Name of Vars block to load with the document
|
206
|
+
:default: "(document_vars)"
|
207
|
+
:procname: val_as_str
|
208
|
+
|
209
|
+
- :opt_name: document_play_bin
|
210
|
+
:env_var: MDE_DOCUMENT_PLAY_BIN
|
211
|
+
:default: play
|
164
212
|
:procname: val_as_str
|
165
213
|
|
166
214
|
- :opt_name: document_saved_lines_glob
|
@@ -402,29 +450,59 @@
|
|
402
450
|
:default: true
|
403
451
|
:procname: val_as_bool
|
404
452
|
|
405
|
-
- :opt_name:
|
406
|
-
:env_var:
|
407
|
-
:default:
|
453
|
+
- :opt_name: heading1_collapse
|
454
|
+
:env_var: MDE_HEADING1_COLLAPSE
|
455
|
+
:default: false
|
408
456
|
:procname: val_as_bool
|
409
457
|
|
410
|
-
- :opt_name:
|
411
|
-
:env_var:
|
412
|
-
:default:
|
458
|
+
- :opt_name: heading1_collapsible
|
459
|
+
:env_var: MDE_HEADING1_COLLAPSIBLE
|
460
|
+
:default: false
|
413
461
|
:procname: val_as_bool
|
414
462
|
|
415
463
|
- :opt_name: heading1_match
|
416
464
|
:env_var: MDE_HEADING1_MATCH
|
417
|
-
:default: "^#(?<line>(?!#)(?<indent>[ \t]*)(?<text>.*?)(?<trailing>[ \t]*))?$"
|
465
|
+
:default: "^#(?<line>(?!#)(?<collapse>[+-~]?)(?<indent>[ \t]*)(?<text>.*?)(?<trailing>[ \t]*))?$"
|
418
466
|
:procname: val_as_str
|
419
467
|
|
468
|
+
- :opt_name: heading2_center
|
469
|
+
:env_var: MDE_HEADING2_CENTER
|
470
|
+
:default: true
|
471
|
+
:procname: val_as_bool
|
472
|
+
|
473
|
+
- :opt_name: heading2_collapse
|
474
|
+
:env_var: MDE_HEADING2_COLLAPSE
|
475
|
+
:default: false
|
476
|
+
:procname: val_as_bool
|
477
|
+
|
478
|
+
- :opt_name: heading2_collapsible
|
479
|
+
:env_var: MDE_HEADING2_COLLAPSIBLE
|
480
|
+
:default: true
|
481
|
+
:procname: val_as_bool
|
482
|
+
|
420
483
|
- :opt_name: heading2_match
|
421
484
|
:env_var: MDE_HEADING2_MATCH
|
422
|
-
:default: "^##(?<line>(?!#)(?<indent>[ \t]*)(?<text>.*?)(?<trailing>[ \t]*))?$"
|
485
|
+
:default: "^##(?<line>(?!#)(?<collapse>[+-~]?)(?<indent>[ \t]*)(?<text>.*?)(?<trailing>[ \t]*))?$"
|
423
486
|
:procname: val_as_str
|
424
487
|
|
488
|
+
- :opt_name: heading3_center
|
489
|
+
:env_var: MDE_HEADING3_CENTER
|
490
|
+
:default: true
|
491
|
+
:procname: val_as_bool
|
492
|
+
|
493
|
+
- :opt_name: heading3_collapse
|
494
|
+
:env_var: MDE_HEADING3_COLLAPSE
|
495
|
+
:default: false
|
496
|
+
:procname: val_as_bool
|
497
|
+
|
498
|
+
- :opt_name: heading3_collapsible
|
499
|
+
:env_var: MDE_HEADING3_COLLAPSIBLE
|
500
|
+
:default: true
|
501
|
+
:procname: val_as_bool
|
502
|
+
|
425
503
|
- :opt_name: heading3_match
|
426
504
|
:env_var: MDE_HEADING3_MATCH
|
427
|
-
:default: "^###(?<line>(?<indent>[ \t]*)(?<text>.*?)(?<trailing>[ \t]*))?$"
|
505
|
+
:default: "^###(?<collapse>[+-~]?)(?<line>(?<indent>[ \t]*)(?<text>.*?)(?<trailing>[ \t]*))?$"
|
428
506
|
:procname: val_as_str
|
429
507
|
|
430
508
|
- :long_name: help
|
@@ -593,6 +671,13 @@
|
|
593
671
|
:default: ".+\\.md"
|
594
672
|
:procname: val_as_str
|
595
673
|
|
674
|
+
- :opt_name: menu_active_color_pastel_messages
|
675
|
+
:env_var: MDE_MENU_ACTIVE_COLOR_PASTEL_MESSAGES
|
676
|
+
:description: menu_active_color_pastel_messages
|
677
|
+
:default:
|
678
|
+
- bright_magenta
|
679
|
+
- on_black
|
680
|
+
|
596
681
|
- :opt_name: menu_back_at_top
|
597
682
|
:env_var: MDE_MENU_BACK_AT_TOP
|
598
683
|
:description: Display Back option at top of menu (vs bottom)
|
@@ -632,6 +717,18 @@
|
|
632
717
|
:default: "%{line}"
|
633
718
|
:procname: val_as_str
|
634
719
|
|
720
|
+
- :opt_name: menu_collapsible_symbol_collapsed
|
721
|
+
:env_var: MDE_MENU_COLLAPSIBLE_SYMBOL_COLLAPSED
|
722
|
+
:description: menu_collapsible_symbol_collapsed
|
723
|
+
:default: '⬢' # ∆ ⬢ +
|
724
|
+
:procname: val_as_str
|
725
|
+
|
726
|
+
- :opt_name: menu_collapsible_symbol_expanded
|
727
|
+
:env_var: MDE_MENU_COLLAPSIBLE_SYMBOL_expandED
|
728
|
+
:description: menu_collapsible_symbol_expanded
|
729
|
+
:default: '⬡' # … ⬡ -
|
730
|
+
:procname: val_as_str
|
731
|
+
|
635
732
|
- :opt_name: menu_divider_color
|
636
733
|
:env_var: MDE_MENU_DIVIDER_COLOR
|
637
734
|
:description: Color of menu divider
|
@@ -644,12 +741,6 @@
|
|
644
741
|
:default: "-:= %{line} =:-"
|
645
742
|
:procname: val_as_str
|
646
743
|
|
647
|
-
- :opt_name: menu_divider_match
|
648
|
-
:env_var: MDE_MENU_DIVIDER_MATCH
|
649
|
-
:description: Pattern for topics/dividers in block selection menu
|
650
|
-
:default: "^(?<indent>[ \t]*):::(?<line>(?<text>.*?)(?<trailing>[ \t]*))?$"
|
651
|
-
:procname: val_as_str
|
652
|
-
|
653
744
|
- :opt_name: menu_divider_symbol
|
654
745
|
:env_var: MDE_MENU_DIVIDER_SYMBOL
|
655
746
|
:description: Symbol before each divider
|
@@ -903,7 +994,7 @@
|
|
903
994
|
- :opt_name: menu_table_rows_match
|
904
995
|
:env_var: MDE_MENU_TABLE_ROWS_MATCH
|
905
996
|
:description: Pattern for table rows
|
906
|
-
:default: '^(?<line>[ \t]*(?<text>\|.*?)(?<trailing>[ \t]*))$'
|
997
|
+
:default: '^(?<line>(?<indent>[ \t]*)(?<text>\|.*?)(?<trailing>[ \t]*))$'
|
907
998
|
:procname: val_as_str
|
908
999
|
|
909
1000
|
- :opt_name: menu_task_color
|
@@ -1095,6 +1186,16 @@
|
|
1095
1186
|
:default: false
|
1096
1187
|
:procname: val_as_bool
|
1097
1188
|
|
1189
|
+
- :opt_name: play_bin_batch
|
1190
|
+
:env_var: MDE_PLAY_BIN_BATCH
|
1191
|
+
:default: play
|
1192
|
+
:procname: val_as_str
|
1193
|
+
|
1194
|
+
- :opt_name: play_bin_interactive
|
1195
|
+
:env_var: MDE_PLAY_BIN_INTERACTIVE
|
1196
|
+
:default: play_interactive
|
1197
|
+
:procname: val_as_str
|
1198
|
+
|
1098
1199
|
- :opt_name: probe
|
1099
1200
|
:long_name: probe
|
1100
1201
|
:env_var: MDE_PROBE
|
@@ -1469,6 +1570,12 @@
|
|
1469
1570
|
:description: Color for table border
|
1470
1571
|
:default: fg_bg_rgbh_00_00_df_14_18_1c
|
1471
1572
|
|
1573
|
+
- :opt_name: table_center
|
1574
|
+
:env_var: MDE_TABLE_CENTER
|
1575
|
+
:arg_name: BOOL
|
1576
|
+
:default: true
|
1577
|
+
:procname: val_as_bool
|
1578
|
+
|
1472
1579
|
- :opt_name: table_header_row_color
|
1473
1580
|
:env_var: MDE_TABLE_HEADER_ROW_COLOR
|
1474
1581
|
:description: Color for table header row
|