markdown_exec 3.3.0 → 3.5.0

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +8 -1
  5. data/README.md +262 -116
  6. data/Rakefile +2 -1
  7. data/bats/block-type-shell-require-ux.bats +15 -0
  8. data/bats/block-type-ux-auto.bats +1 -1
  9. data/bats/block-type-ux-default.bats +1 -1
  10. data/bats/block-type-ux-echo-hash.bats +2 -2
  11. data/bats/block-type-ux-exec-hash.bats +2 -2
  12. data/bats/block-type-ux-exec.bats +1 -1
  13. data/bats/block-type-ux-no-name.bats +8 -0
  14. data/bats/block-type-ux-require-context.bats +14 -0
  15. data/bats/block-type-ux-row-format.bats +1 -1
  16. data/bats/block-type-ux-transform.bats +1 -1
  17. data/bats/command-substitution-options.bats +2 -2
  18. data/bats/import-directive-line-continuation.bats +9 -0
  19. data/bats/import-directive-parameter-symbols.bats +1 -1
  20. data/bats/import-parameter-symbols.bats +1 -1
  21. data/bats/option-expansion.bats +1 -1
  22. data/bats/options.bats +2 -2
  23. data/bats/table-column-truncate.bats +1 -1
  24. data/bats/table.bats +1 -1
  25. data/bats/test_helper.bash +4 -3
  26. data/demo/trap.demo1.gif +0 -0
  27. data/demo/trap.demo1.mp4 +0 -0
  28. data/docs/dev/block-type-shell-require-ux.md +18 -0
  29. data/docs/dev/block-type-ux-format.md +10 -0
  30. data/docs/dev/block-type-ux-no-name.md +17 -0
  31. data/docs/dev/block-type-ux-require-context.md +32 -0
  32. data/docs/dev/block-type-ux-require.md +8 -4
  33. data/docs/dev/block-type-ux-row-format.md +1 -1
  34. data/docs/dev/import-directive-line-continuation.md +5 -0
  35. data/docs/dev/import-directive-parameter-symbols.md +0 -2
  36. data/docs/dev/import-parameter-symbols-template.md +7 -5
  37. data/docs/dev/import-parameter-symbols.md +10 -2
  38. data/docs/dev/table-column-truncate.md +1 -1
  39. data/examples/colors.md +31 -29
  40. data/lib/cached_nested_file_reader.rb +31 -51
  41. data/lib/command_result.rb +5 -5
  42. data/lib/constants.rb +3 -1
  43. data/lib/fcb.rb +22 -8
  44. data/lib/format_table.rb +22 -7
  45. data/lib/hash_delegator.rb +77 -33
  46. data/lib/link_history.rb +1 -1
  47. data/lib/markdown_exec/version.rb +1 -1
  48. data/lib/menu.src.yml +47 -38
  49. data/lib/menu.yml +43 -34
  50. data/lib/parameter_expansion.rb +918 -0
  51. data/lib/parse_animation_to_tts.rb +4417 -0
  52. data/lib/resize_terminal.rb +19 -16
  53. data/lib/ww.rb +493 -15
  54. metadata +15 -2
data/lib/format_table.rb CHANGED
@@ -142,10 +142,10 @@ module MarkdownTableFormatter
142
142
 
143
143
  def format_table__hs(
144
144
  column_count:,
145
+ decorate: nil,
145
146
  lines:,
147
+ max_table_width: nil,
146
148
  table:,
147
- decorate: nil,
148
- table_width: nil,
149
149
  truncate: true
150
150
  )
151
151
  unless column_count.positive?
@@ -162,13 +162,26 @@ module MarkdownTableFormatter
162
162
  alignment_indicators, column_widths =
163
163
  calculate_column_alignment_and_widths(rows, column_count)
164
164
 
165
- unless table_width.nil?
166
- sum_column_widths = column_widths.sum + ((column_count * 3) + 5)
167
- if sum_column_widths > table_width
168
- ratio = table_width.to_f / sum_column_widths
165
+ unless max_table_width.nil?
166
+ # each column has a frame width of 3 characters
167
+ # border and space before and after each and 1 final border
168
+ borders_width = (column_count * 3) + 1
169
+
170
+ full_column_table_width = column_widths.sum + borders_width
171
+
172
+ if full_column_table_width > max_table_width
173
+ text_width_sum = full_column_table_width - borders_width
174
+ available_text_width = max_table_width - borders_width
175
+ ratio = available_text_width.to_f / text_width_sum
176
+
177
+ # distribute the width across the columns
169
178
  column_widths.each_with_index do |width, i|
170
179
  column_widths[i] = (width * ratio).to_i
171
180
  end
181
+
182
+ # the last column fills the remaining width
183
+ column_widths[column_widths.count - 1] =
184
+ available_text_width - column_widths.sum + column_widths.last
172
185
  end
173
186
  end
174
187
 
@@ -238,6 +251,7 @@ end
238
251
  return if $PROGRAM_NAME != __FILE__
239
252
 
240
253
  require 'minitest/autorun'
254
+ require_relative 'ww'
241
255
 
242
256
  class TestMarkdownTableFormatter < Minitest::Test
243
257
  def setup
@@ -377,7 +391,8 @@ class TestFormatTable < Minitest::Test
377
391
  # "| A | B | C ",
378
392
  # "| 1 | 2 | 3 "
379
393
  # ]
380
- # assert_equal expected, MarkdownTableFormatter.format_table(lines, column_count)
394
+ # assert_equal expected,
395
+ # MarkdownTableFormatter.format_table(lines, column_count)
381
396
  # end
382
397
 
383
398
  def test_empty_input
@@ -325,8 +325,8 @@ module HashDelegatorSelf
325
325
  separator_line: delegate_object[:table_separator_line_color]
326
326
  },
327
327
  lines: lines,
328
+ max_table_width: screen_width_for_table,
328
329
  table: table,
329
- table_width: screen_width_for_table,
330
330
  truncate: $table_cell_truncate
331
331
  )
332
332
 
@@ -431,6 +431,7 @@ module HashDelegatorSelf
431
431
  return unless block && block_type_selected?(selected_types, :line)
432
432
 
433
433
  opts = {
434
+ block: nil,
434
435
  body: [line],
435
436
  id: source_id
436
437
  }
@@ -964,6 +965,7 @@ module MarkdownExec
964
965
  # fcb.type = type
965
966
  else
966
967
  fcb = persist_fcb(
968
+ block: nil,
967
969
  body: fcb0.body,
968
970
  center: fcb0.center,
969
971
  chrome: true,
@@ -1316,13 +1318,13 @@ module MarkdownExec
1316
1318
  # for BlockType::UX
1317
1319
  def code_from_ux_block_to_set_environment_variables(
1318
1320
  selected, mdoc, inherited_code: nil, force: true, only_default: false,
1319
- silent:
1321
+ required: nil, silent:
1320
1322
  )
1321
1323
  wwt :fcb, 'selected:', selected
1322
1324
  ret_command_result = nil
1323
1325
  exit_prompt = @delegate_object[:prompt_filespec_back]
1324
1326
 
1325
- required = mdoc.collect_recursively_required_code(
1327
+ required ||= mdoc.collect_recursively_required_code(
1326
1328
  anyname: selected_id_name(selected),
1327
1329
  label_format_above: @delegate_object[:shell_code_label_format_above],
1328
1330
  label_format_below: @delegate_object[:shell_code_label_format_below],
@@ -1331,8 +1333,8 @@ module MarkdownExec
1331
1333
  wwt :required, required
1332
1334
 
1333
1335
  # process each ux block in sequence, setting ENV and collecting lines
1334
- required_lines = []
1335
- required[:blocks].each do |block|
1336
+ concatenated_code_from_required_blocks = []
1337
+ required[:blocks]&.each do |block|
1336
1338
  next unless block.type == BlockType::UX
1337
1339
 
1338
1340
  wwt :fcb, 'a required block', block
@@ -1360,9 +1362,9 @@ module MarkdownExec
1360
1362
 
1361
1363
  eval_code = join_array_of_arrays(
1362
1364
  inherited_code, # inherited code
1363
- required_lines, # current block requirements
1365
+ concatenated_code_from_required_blocks, # current block requirements
1364
1366
  required_variables, # test conditions
1365
- required[:code] # current block code
1367
+ required[:code] # required by selected
1366
1368
  )
1367
1369
  wwt :eval_code, 'eval_code:', eval_code
1368
1370
  if only_default
@@ -1386,24 +1388,24 @@ module MarkdownExec
1386
1388
  # update the required lines for this and subsequent blocks
1387
1389
  command_result_w_e_t_nl.new_lines =
1388
1390
  process_command_result_lines(command_result_w_e_t_nl, export,
1389
- required_lines)
1390
- required_lines.concat(command_result_w_e_t_nl.new_lines)
1391
+ concatenated_code_from_required_blocks)
1392
+ concatenated_code_from_required_blocks.concat(command_result_w_e_t_nl.new_lines)
1391
1393
 
1392
- required_lines = annotate_required_lines(
1393
- 'blk:UX', required_lines, block_name: selected.id
1394
+ concatenated_code_from_required_blocks = annotate_required_lines(
1395
+ 'blk:UX', concatenated_code_from_required_blocks, block_name: selected.id
1394
1396
  )
1395
1397
 
1396
- command_result_w_e_t_nl.new_lines = required_lines
1398
+ command_result_w_e_t_nl.new_lines = concatenated_code_from_required_blocks
1397
1399
  ret_command_result = command_result_w_e_t_nl
1398
1400
  else
1399
1401
  raise "Invalid data type: #{data.inspect}"
1400
1402
  end
1401
1403
  end
1402
- wwt :required_lines, required_lines
1404
+ wwt :concatenated_code_from_required_blocks, concatenated_code_from_required_blocks
1403
1405
 
1404
1406
  (ret_command_result || CommandResult.new(
1405
1407
  stdout: annotate_required_lines(
1406
- 'blk:UX', required_lines, block_name: selected.id
1408
+ 'blk:UX', concatenated_code_from_required_blocks, block_name: selected.id
1407
1409
  )
1408
1410
  )).tap do |ret|
1409
1411
  wwt :cr, ret, caller.deref
@@ -1852,6 +1854,7 @@ module MarkdownExec
1852
1854
  def create_and_add_chrome_blocks(blocks, fcb, id: '', init_ids: false)
1853
1855
  index = nil
1854
1856
 
1857
+ # find the first criteria with a pattern matching the body of the fcb
1855
1858
  unless (criteria = fcb.criteria)
1856
1859
  HashDelegator.chrome_block_criteria.each_with_index do |criteria1, index1|
1857
1860
  # rubocop:disable Lint/UselessAssignment
@@ -2450,7 +2453,7 @@ module MarkdownExec
2450
2453
  #
2451
2454
  if link_block_data.fetch(LinkKeys::EVAL, false) ||
2452
2455
  link_block_data.fetch(LinkKeys::EXEC, false)
2453
- code_lines += link_block_data_eval(
2456
+ code_lines = link_block_data_eval(
2454
2457
  link_state, code_lines, selected, link_block_data,
2455
2458
  block_source: block_source,
2456
2459
  shell: @delegate_object[:block_type_default]
@@ -2622,18 +2625,36 @@ module MarkdownExec
2622
2625
  required[:blocks].map(&:body).flatten(1)
2623
2626
  )
2624
2627
  else
2625
- code_lines = if selected.type == BlockType::VARS
2628
+ # code from the selected VARS block
2629
+ vars_code = if selected.type == BlockType::VARS
2626
2630
  code_from_vars_block_to_set_environment_variables(selected)
2627
2631
  else
2628
2632
  []
2629
2633
  end
2634
+
2635
+ # activate UX blocks in the required list
2636
+ command_result_w_e_t_nl = code_from_ux_block_to_set_environment_variables(
2637
+ selected,
2638
+ @dml_mdoc,
2639
+ inherited_code: vars_code,
2640
+ only_default: false,
2641
+ required: required,
2642
+ silent: false
2643
+ )
2644
+ ux_code = command_result_w_e_t_nl.failure? ? [] : command_result_w_e_t_nl.new_lines
2645
+
2630
2646
  HashDelegator.flatten_and_compact_arrays(
2631
2647
  link_state&.inherited_lines,
2632
2648
  annotate_required_lines(
2633
- 'blk:PORT', required[:code] + code_lines, block_name: selected.id
2649
+ 'blk:PORT',
2650
+ required[:code] + vars_code + ux_code,
2651
+ block_name: selected.id
2634
2652
  )
2635
2653
  )
2636
2654
  end
2655
+
2656
+ rescue StandardError
2657
+ wwe(required[:code], ux_code, { error: $!, callback: $@[0] })
2637
2658
  end
2638
2659
 
2639
2660
  def execute_block_type_save(code_lines:, selected:)
@@ -3380,29 +3401,48 @@ module MarkdownExec
3380
3401
  output_lines = []
3381
3402
 
3382
3403
  Tempfile.open do |file|
3383
- cmd = "#{shell} #{file.path}"
3384
3404
  file.write(all_code.join("\n"))
3385
3405
  file.rewind
3386
3406
 
3387
3407
  if link_block_data.fetch(LinkKeys::EXEC, false)
3408
+ # exec: true
3409
+
3388
3410
  @run_state.files = StreamsOut.new
3389
- execute_command_with_streams([cmd]) do |_stdin, stdout, stderr, _thread|
3411
+ execute_command_with_streams(
3412
+ ["#{shell} #{file.path}"]
3413
+ ) do |_stdin, stdout, stderr, _thread|
3390
3414
  line = stdout || stderr
3391
3415
  output_lines.push(line) if line
3392
3416
  end
3393
3417
 
3394
- ## select output_lines that look like assignment or match other specs
3395
- #
3396
- output_lines = process_string_array(
3397
- output_lines,
3398
- begin_pattern: @delegate_object.fetch(:output_assignment_begin,
3399
- nil),
3400
- end_pattern: @delegate_object.fetch(:output_assignment_end, nil),
3401
- scan1: @delegate_object.fetch(:output_assignment_match, nil),
3402
- format1: @delegate_object.fetch(:output_assignment_format, nil),
3403
- name: ''
3404
- )
3418
+ if link_block_data.fetch(LinkKeys::EVAL, true)
3419
+ # eval: true
3420
+
3421
+ ## select output_lines that look like assignment or match other specs
3422
+ #
3423
+ output_lines = process_string_array(
3424
+ output_lines,
3425
+ begin_pattern: @delegate_object.fetch(:output_assignment_begin,
3426
+ nil),
3427
+ end_pattern: @delegate_object.fetch(:output_assignment_end, nil),
3428
+ scan1: @delegate_object.fetch(:output_assignment_match, nil),
3429
+ format1: @delegate_object.fetch(:output_assignment_format, nil),
3430
+ name: ''
3431
+ )
3405
3432
 
3433
+ else
3434
+ # eval: false
3435
+
3436
+ ## select all output_lines
3437
+ #
3438
+ output_lines = process_string_array(
3439
+ output_lines,
3440
+ begin_pattern: @delegate_object.fetch(:output_assignment_begin,
3441
+ nil),
3442
+ end_pattern: @delegate_object.fetch(:output_assignment_end, nil),
3443
+ name: ''
3444
+ )
3445
+ end
3406
3446
  else
3407
3447
  output_lines = `bash #{file.path}`.split("\n")
3408
3448
  end
@@ -4891,6 +4931,7 @@ module MarkdownExec
4891
4931
  end
4892
4932
 
4893
4933
  persist_fcb(
4934
+ block: [line],
4894
4935
  body: [],
4895
4936
  call: rest.match(
4896
4937
  Regexp.new(@delegate_object[:block_calls_scan])
@@ -4942,6 +4983,8 @@ module MarkdownExec
4942
4983
  )
4943
4984
  )
4944
4985
  end
4986
+ rescue StandardError
4987
+ wwe $!, 'value:', value
4945
4988
  end
4946
4989
 
4947
4990
  ##
@@ -4985,6 +5028,7 @@ module MarkdownExec
4985
5028
  if state[:in_fenced_block]
4986
5029
  ## end of code block
4987
5030
  #
5031
+ state[:fcb].append_block_line(line)
4988
5032
  HashDelegator.update_menu_attrib_yield_selected(
4989
5033
  fcb: state[:fcb],
4990
5034
  messages: selected_types,
@@ -5008,9 +5052,9 @@ module MarkdownExec
5008
5052
  ## add line to fenced code block
5009
5053
  # remove fcb indent if possible
5010
5054
  #
5011
- state[:fcb].body += [
5012
- line.chomp.sub(/^#{state[:fcb].indent}/, '')
5013
- ]
5055
+ tline = line.chomp.sub(/^#{state[:fcb].indent}/, '')
5056
+ state[:fcb].append_block_line(tline)
5057
+ state[:fcb].body += [tline]
5014
5058
  elsif nested_line[:depth].zero? ||
5015
5059
  @delegate_object[:menu_include_imported_notes]
5016
5060
  # add line if it is depth 0 or option allows it
data/lib/link_history.rb CHANGED
@@ -59,7 +59,7 @@ module MarkdownExec
59
59
 
60
60
  def inherited_lines=(value)
61
61
  @inherited_lines = value.tap do |ret|
62
- pp ['LinkState.inherited_lines=() ->', ret] if $pd
62
+ pp ['LinkState.inherited_lines=() ->', ret, caller.deref(3).last] if $pd
63
63
  end
64
64
  end
65
65
 
@@ -8,5 +8,5 @@ module MarkdownExec
8
8
  BIN_NAME = 'mde'
9
9
  GEM_NAME = 'markdown_exec'
10
10
  TAP_DEBUG = 'MDE_DEBUG'
11
- VERSION = '3.3.0'
11
+ VERSION = '3.5.0'
12
12
  end
data/lib/menu.src.yml CHANGED
@@ -325,7 +325,7 @@
325
325
  - :opt_name: exception_color_detail
326
326
  :env_var: MDE_EXCEPTION_COLOR_DETAIL
327
327
  :description: Color of exception detail
328
- :default: fg_rgbh_ff_00_7f
328
+ :default: fg_rgbh_ff_99_cc # Light pink - softer error detail color, less harsh than bright magenta
329
329
  :procname: val_as_str
330
330
 
331
331
  - :opt_name: exception_format_detail
@@ -337,7 +337,7 @@
337
337
  - :opt_name: exception_color_name
338
338
  :env_var: MDE_EXCEPTION_COLOR_NAME
339
339
  :description: Color of exception name
340
- :default: fg_rgbh_ff_00_00
340
+ :default: fg_rgbh_ff_6b_6b # Light red - matches exec color for serious attention
341
341
  :procname: val_as_str
342
342
 
343
343
  - :opt_name: exception_format_name
@@ -415,7 +415,7 @@
415
415
  - :opt_name: execution_report_preview_frame_color
416
416
  :env_var: MDE_EXECUTION_REPORT_PREVIEW_FRAME_COLOR
417
417
  :description: execution_report_preview_frame_color
418
- :default: fg_rgbh_7f_ff_00
418
+ :default: fg_rgbh_90_e0_90 # Light green - consistent with allow/success colors
419
419
  :procname: val_as_str
420
420
 
421
421
  - :opt_name: execution_report_preview_head
@@ -575,13 +575,13 @@
575
575
  - :opt_name: import_directive_line_pattern
576
576
  :env_var: MDE_IMPORT_PATTERN
577
577
  :default: >-
578
- ^(?<indention> *)@import +(?<name>\S+)(?<params>(?: +\w+(?::c=|:e=|:q=|:v=|=)(?:"[^"]*"|'[^']*'|\S+))*) *$
578
+ ^(?<indention> *)@import +(?<name>\S+)(?<params>(?: +\w+(?::(?:[ceqv]|[ceqv]{2})=|=)(?:"[^"]*"|'[^']*'|\S+))*) *\\?$
579
579
  :procname: val_as_str
580
580
 
581
581
  - :opt_name: import_directive_parameter_scan
582
582
  :env_var: MDE_IMPORT_PATTERN_SCAN
583
583
  :default: >-
584
- (\w+)(:c=|:e=|:q=|:v=|=)(?:"([^"]*)"|'([^']*)'|(\S+))
584
+ (\w+)(:[ceqv]{1,2}=|=)(?:"([^"]*)"|'([^']*)'|(\S+))
585
585
  :procname: val_as_str
586
586
 
587
587
  - :opt_name: import_parameter_variable_assignment
@@ -622,16 +622,20 @@
622
622
  :pattern: '\*\*_([^_]{0,64})_\*\*'
623
623
  - :color_method: :bold_italic
624
624
  :pattern: '\*\*~([^~]{0,64})~\*\*'
625
+ - :color_method: :bold_italic
626
+ :pattern: '\*\*\*([^*]{0,64})\*\*\*' # common
625
627
  - :color_method: :bold
626
- :pattern: '\*\*([^*]{0,64})\*\*'
628
+ :pattern: '\*\*([^*]{0,64})\*\*' # common
629
+ - :color_method: :italic
630
+ :pattern: '`([^`]{0,64})`' # common
627
631
  - :color_method: :italic
628
- :pattern: '`([^`]{0,64})`'
632
+ :pattern: '\*([^*]{0,64})\*' # common
629
633
  - :color_method: :underline
630
634
  :pattern: __([^_]{0,64})__
631
635
  - :color_method: :underline_italic
632
636
  :pattern: _~([^_]{0,64})~_
633
637
  - :color_method: strikethrough
634
- :pattern: '~~([^~]{0,64})~~'
638
+ :pattern: '~~([^~]{0,64})~~' # common
635
639
 
636
640
  - :opt_name: line_decor_post
637
641
  :env_var: MDE_LINE_DECOR_POST
@@ -757,7 +761,13 @@
757
761
  - :opt_name: menu_bash_color
758
762
  :env_var: MDE_MENU_BASH_COLOR
759
763
  :description: Color of menu bash
760
- :default: fg_rgbh_00_c0_c0
764
+ :default: fg_rgbh_87_ce_eb # Sky blue - matches echo color for informational bash blocks
765
+ :procname: val_as_str
766
+
767
+ - :opt_name: menu_block_color
768
+ :env_var: MDE_MENU_BLOCK_COLOR
769
+ :description: Default color for fenced code blocks
770
+ :default: fg_rgbh_60_a0_a0 # Teal - unrecognized fcb type, not active
761
771
  :procname: val_as_str
762
772
 
763
773
  - :opt_name: menu_blocks_with_docname
@@ -777,7 +787,7 @@
777
787
  - :opt_name: menu_chrome_color
778
788
  :env_var: MDE_MENU_CHROME_COLOR
779
789
  :description: Color of menu chrome
780
- :default: fg_rgbh_40_c0_c0
790
+ :default: fg_rgbh_b0_b0_b0 # Medium gray - neutral, non-distracting UI chrome
781
791
  :procname: val_as_str
782
792
 
783
793
  - :opt_name: menu_chrome_format
@@ -801,7 +811,7 @@
801
811
  - :opt_name: menu_divider_color
802
812
  :env_var: MDE_MENU_DIVIDER_COLOR
803
813
  :description: Color of menu divider
804
- :default: fg_rgbh_80_d0_c0
814
+ :default: fg_rgbh_d0_d0_d0 # Light gray - subtle, neutral separators
805
815
  :procname: val_as_str
806
816
 
807
817
  - :opt_name: menu_divider_format
@@ -819,7 +829,7 @@
819
829
  - :opt_name: menu_edit_color
820
830
  :env_var: MDE_MENU_EDIT_COLOR
821
831
  :description: Color of Edit link
822
- :default: fg_rgbh_e0_e0_20
832
+ :default: fg_rgbh_ff_b3_66 # Light orange - matches edit UX color for consistency
823
833
  :procname: val_as_str
824
834
 
825
835
  - :opt_name: menu_exit_at_top
@@ -852,7 +862,7 @@
852
862
  - :opt_name: menu_heading1_color
853
863
  :env_var: MDE_MENU_HEADING1_COLOR
854
864
  :description: Color for heading 1 in menu
855
- :default: fg_bg_rgbh_80_80_c0_10_10_20
865
+ :default: fg_bg_rgbh_70_70_b0_07_07_04 # Medium blue
856
866
  :procname: val_as_str
857
867
 
858
868
  - :opt_name: menu_heading1_format
@@ -864,7 +874,7 @@
864
874
  - :opt_name: menu_heading2_color
865
875
  :env_var: MDE_MENU_HEADING2_COLOR
866
876
  :description: Color for heading 2 in menu
867
- :default: fg_bg_rgbh_60_60_c0_10_10_20
877
+ :default: fg_bg_rgbh_60_60_a0_0a_0a_07 # Lighter blue
868
878
  :procname: val_as_str
869
879
 
870
880
  - :opt_name: menu_heading2_format
@@ -876,7 +886,7 @@
876
886
  - :opt_name: menu_heading3_color
877
887
  :env_var: MDE_MENU_HEADING3_COLOR
878
888
  :description: Color for heading 3 in menu
879
- :default: fg_bg_rgbh_40_40_c0_10_10_20
889
+ :default: fg_bg_rgbh_50_50_90_0e_0e_0a # Lightest blue
880
890
  :procname: val_as_str
881
891
 
882
892
  - :opt_name: menu_heading3_format
@@ -888,7 +898,7 @@
888
898
  - :opt_name: menu_history_color
889
899
  :env_var: MDE_MENU_HISTORY_COLOR
890
900
  :description: Color of History link
891
- :default: fg_rgbh_e0_e0_20
901
+ :default: fg_rgbh_87_ce_eb # Sky blue - informational like echo, for browsing history
892
902
  :procname: val_as_str
893
903
 
894
904
  - :opt_name: menu_import_level_match
@@ -921,7 +931,7 @@
921
931
  - :opt_name: menu_inherited_lines_color
922
932
  :env_var: MDE_MENU_INHERITED_LINES_COLOR
923
933
  :description: Color of inherited lines in menu
924
- :default: fg_rgbh_94_00_D3
934
+ :default: fg_rgbh_b3_9a_d8 # Light purple - softer than bright purple for inherited content
925
935
  :procname: val_as_str
926
936
 
927
937
  - :opt_name: menu_inherited_lines_edit_always
@@ -946,7 +956,7 @@
946
956
  - :opt_name: menu_link_color
947
957
  :env_var: MDE_MENU_LINK_COLOR
948
958
  :description: Color of menu link
949
- :default: fg_rgbh_e0_e0_20
959
+ :default: fg_rgbh_90_e0_90 # Light green - indicates safe/allowed navigation
950
960
  :procname: val_as_str
951
961
 
952
962
  - :opt_name: menu_link_format
@@ -965,7 +975,7 @@
965
975
  - :opt_name: menu_load_color
966
976
  :env_var: MDE_MENU_LOAD_COLOR
967
977
  :description: Color of Load link
968
- :default: fg_rgbh_e0_e0_20
978
+ :default: fg_rgbh_87_ce_eb # Sky blue - informational action for loading content
969
979
  :procname: val_as_str
970
980
 
971
981
  - :opt_name: menu_note_color
@@ -1040,13 +1050,13 @@
1040
1050
  - :opt_name: menu_opts_color
1041
1051
  :env_var: MDE_MENU_OPTS_COLOR
1042
1052
  :description: Color of menu opts
1043
- :default: fg_rgbh_ff_00_ff
1053
+ :default: fg_rgbh_d8_b3_ff # Light lavender - matches vars color family for options
1044
1054
  :procname: val_as_str
1045
1055
 
1046
1056
  - :opt_name: menu_opts_set_color
1047
1057
  :env_var: MDE_MENU_OPTS_SET_COLOR
1048
1058
  :description: Color of menu opts
1049
- :default: fg_rgbh_7f_00_ff
1059
+ :default: fg_rgbh_c0_9a_ff # Medium lavender - darker than opts color for set values
1050
1060
  :procname: val_as_str
1051
1061
 
1052
1062
  - :opt_name: menu_opts_set_format
@@ -1071,14 +1081,13 @@
1071
1081
  - :opt_name: menu_save_color
1072
1082
  :env_var: MDE_MENU_SAVE_COLOR
1073
1083
  :description: Color of Save link
1074
- :default: fg_rgbh_ff_ff_20
1075
- # :default: fg_rgbh_e0_e0_20
1084
+ :default: fg_rgbh_90_e0_90 # Light green - indicates safe/allowed save operation
1076
1085
  :procname: val_as_str
1077
1086
 
1078
1087
  - :opt_name: menu_task_color
1079
1088
  :env_var: MDE_MENU_TASK_COLOR
1080
1089
  :description: Color of menu task
1081
- :default: fg_rgbh_ff_ff_ff
1090
+ :default: fg_rgbh_40_40_40 # Dark gray - better contrast than white for readability
1082
1091
  :procname: val_as_str
1083
1092
 
1084
1093
  - :opt_name: menu_task_format
@@ -1102,37 +1111,37 @@
1102
1111
  - :opt_name: menu_ux_color
1103
1112
  :env_var: MDE_MENU_UX_COLOR
1104
1113
  :description: Default color of menu ux
1105
- :default: fg_rgbh_df_c0_df
1114
+ :default: fg_rgbh_df_c0_df # light purple/lavender
1106
1115
  :procname: val_as_str
1107
1116
 
1108
1117
  - :opt_name: menu_ux_color_allow
1109
1118
  :env_var: MDE_MENU_UX_COLOR_ALLOW
1110
1119
  :description: Color of menu ux when it is allow
1111
- :default:
1120
+ :default: fg_rgbh_90_e0_90 # Light green - universally indicates safe/permitted actions
1112
1121
  :procname: val_as_str
1113
1122
 
1114
1123
  - :opt_name: menu_ux_color_echo
1115
1124
  :env_var: MDE_MENU_UX_COLOR_ECHO
1116
1125
  :description: Color of menu ux when it is echo
1117
- :default:
1126
+ :default: fg_rgbh_87_ce_eb # Sky blue - calm, informational, non-destructive display
1118
1127
  :procname: val_as_str
1119
1128
 
1120
1129
  - :opt_name: menu_ux_color_edit
1121
1130
  :env_var: MDE_MENU_UX_COLOR_EDIT
1122
1131
  :description: Color of menu ux when it is edit
1123
- :default:
1132
+ :default: fg_rgbh_ff_b3_66 # Light orange - caution color for modification operations
1124
1133
  :procname: val_as_str
1125
1134
 
1126
1135
  - :opt_name: menu_ux_color_exec
1127
1136
  :env_var: MDE_MENU_UX_COLOR_EXEC
1128
1137
  :description: Color of menu ux when it is exec
1129
- :default:
1138
+ :default: fg_rgbh_ff_6b_6b # Light red - attention-demanding color for execution commands
1130
1139
  :procname: val_as_str
1131
1140
 
1132
1141
  - :opt_name: menu_ux_color_readonly
1133
1142
  :env_var: MDE_MENU_UX_COLOR_READONLY
1134
1143
  :description: Color of menu ux when it is read-only
1135
- :default:
1144
+ :default: fg_rgbh_c0_c0_c0 # Light gray - standard disabled/inactive UI element color
1136
1145
  :procname: val_as_str
1137
1146
 
1138
1147
  - :opt_name: menu_ux_row_format
@@ -1144,13 +1153,13 @@
1144
1153
  - :opt_name: menu_vars_color
1145
1154
  :env_var: MDE_MENU_VARS_COLOR
1146
1155
  :description: Color of menu vars
1147
- :default: fg_rgbh_ff_a0_ff
1156
+ :default: fg_rgbh_d8_b3_ff # Light lavender - complements default purple, softer than bright magenta
1148
1157
  :procname: val_as_str
1149
1158
 
1150
1159
  - :opt_name: menu_vars_set_color
1151
1160
  :env_var: MDE_MENU_VARS_SET_COLOR
1152
1161
  :description: Color of menu vars
1153
- :default: fg_rgbh_00_ff_ff
1162
+ :default: fg_rgbh_a0_e6_e6 # Light teal - calmer than bright cyan, distinct from sky blue
1154
1163
  :procname: val_as_str
1155
1164
 
1156
1165
  - :opt_name: menu_vars_set_format
@@ -1257,13 +1266,13 @@
1257
1266
  - :opt_name: output_execution_label_name_color
1258
1267
  :env_var: MDE_OUTPUT_EXECUTION_LABEL_NAME_COLOR
1259
1268
  :description: Color of output_execution_label_name
1260
- :default: fg_rgbh_00_ff_00
1269
+ :default: fg_rgbh_70_c0_70 # Medium green - softer than bright green for labels
1261
1270
  :procname: val_as_str
1262
1271
 
1263
1272
  - :opt_name: output_execution_label_value_color
1264
1273
  :env_var: MDE_OUTPUT_EXECUTION_LABEL_VALUE_COLOR
1265
1274
  :description: Color of output_execution_label_value
1266
- :default: fg_rgbh_00_ff_00
1275
+ :default: fg_rgbh_90_e0_90 # Light green - consistent with success/allow colors
1267
1276
  :procname: val_as_str
1268
1277
 
1269
1278
  - :opt_name: output_execution_report
@@ -1349,7 +1358,7 @@
1349
1358
  - :opt_name: prompt_color_after_script_execution
1350
1359
  :env_var: MDE_PROMPT_COLOR_AFTER_SCRIPT_EXECUTION
1351
1360
  :description: Color of prompt after script execution
1352
- :default: fg_rgbh_00_ff_00
1361
+ :default: fg_rgbh_70_c0_70 # Medium green - indicates successful completion
1353
1362
  :procname: val_as_str
1354
1363
 
1355
1364
  - :opt_name: prompt_debounce
@@ -1614,7 +1623,7 @@
1614
1623
  - :opt_name: script_execution_frame_color
1615
1624
  :env_var: MDE_SCRIPT_EXECUTION_FRAME_COLOR
1616
1625
  :description: script_execution_frame_color
1617
- :default: fg_rgbh_00_ff_7f
1626
+ :default: fg_rgbh_80_d0_a0 # Sage green - calmer frame color for execution context
1618
1627
  :procname: val_as_str
1619
1628
 
1620
1629
  - :opt_name: script_execution_head
@@ -1633,7 +1642,7 @@
1633
1642
  - :opt_name: script_preview_frame_color
1634
1643
  :env_var: MDE_OUTPUT_DIVIDER_COLOR
1635
1644
  :description: Color of output divider
1636
- :default: fg_rgbh_7f_ff_00
1645
+ :default: fg_rgbh_a0_d0_80 # Light sage - preview frame for non-executed content
1637
1646
  :procname: val_as_str
1638
1647
 
1639
1648
  - :opt_name: script_preview_head
@@ -1846,7 +1855,7 @@
1846
1855
  - :opt_name: warning_color
1847
1856
  :env_var: MDE_WARNING_COLOR
1848
1857
  :description: Color of warning message
1849
- :default: fg_rgbh_ff_7f_00
1858
+ :default: fg_rgbh_ff_b3_66 # Light orange - matches edit/caution color for warnings
1850
1859
  :procname: val_as_str
1851
1860
 
1852
1861
  - :opt_name: warning_format