markdown_exec 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +12 -5
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +1 -1
- data/bin/tab_completion.sh +15 -31
- data/examples/block_names.md +23 -0
- data/examples/linked.md +8 -0
- data/examples/linked_show.md +7 -0
- data/examples/load_code.md +10 -0
- data/lib/color_scheme.rb +65 -0
- data/lib/constants.rb +18 -19
- data/lib/find_files.rb +35 -39
- data/lib/hash_delegator.rb +829 -616
- data/lib/input_sequencer.rb +11 -4
- data/lib/markdown_exec/version.rb +1 -1
- data/lib/markdown_exec.rb +16 -7
- data/lib/menu.src.yml +76 -19
- data/lib/menu.yml +68 -12
- metadata +6 -2
data/lib/input_sequencer.rb
CHANGED
@@ -20,6 +20,11 @@ class InputSequencer
|
|
20
20
|
@current_block = nil
|
21
21
|
@block_queue = initial_blocks
|
22
22
|
@debug = Env.env_bool('INPUT_SEQUENCER_DEBUG', default: false)
|
23
|
+
# rubocop:disable Style/RescueStandardError
|
24
|
+
rescue
|
25
|
+
pp $!, $@
|
26
|
+
exit 1
|
27
|
+
# rubocop:enable Style/RescueStandardError
|
23
28
|
end
|
24
29
|
|
25
30
|
# Merges the current menu state with the next, prioritizing the next state's values.
|
@@ -54,6 +59,11 @@ class InputSequencer
|
|
54
59
|
# Orchestrates the flow of menu states and user interactions.
|
55
60
|
def run_yield(sym, *args, &block)
|
56
61
|
block.call sym, *args
|
62
|
+
# rubocop:disable Style/RescueStandardError
|
63
|
+
rescue
|
64
|
+
pp $!, $@
|
65
|
+
exit 1
|
66
|
+
# rubocop:enable Style/RescueStandardError
|
57
67
|
end
|
58
68
|
|
59
69
|
def bq_is_empty?
|
@@ -81,10 +91,7 @@ class InputSequencer
|
|
81
91
|
|
82
92
|
choice = run_yield :user_choice, &block
|
83
93
|
|
84
|
-
if choice.nil?
|
85
|
-
raise 'Block not recognized.'
|
86
|
-
break
|
87
|
-
end
|
94
|
+
raise 'Block not recognized.' if choice.nil?
|
88
95
|
break if run_yield(:exit?, choice&.downcase, &block) # Exit loop and method to terminate the app
|
89
96
|
|
90
97
|
next_state = run_yield :execute_block, choice, &block
|
data/lib/markdown_exec.rb
CHANGED
@@ -18,6 +18,7 @@ require_relative 'ansi_formatter'
|
|
18
18
|
require_relative 'block_label'
|
19
19
|
require_relative 'cached_nested_file_reader'
|
20
20
|
require_relative 'cli'
|
21
|
+
require_relative 'color_scheme'
|
21
22
|
require_relative 'colorize'
|
22
23
|
require_relative 'directory_searcher'
|
23
24
|
require_relative 'env'
|
@@ -110,6 +111,7 @@ module MarkdownExec
|
|
110
111
|
# @return [String] modified file name with age prepended
|
111
112
|
def self.for_menu(filename)
|
112
113
|
file_age = (Time.now - File.mtime(filename)) / (60 * 60 * 24 * 30)
|
114
|
+
filename = ColorScheme.colorize_path(filename)
|
113
115
|
|
114
116
|
" #{Histogram.display(file_age, 0, 11, 12, inverse: false)}: #{filename}"
|
115
117
|
end
|
@@ -117,7 +119,8 @@ module MarkdownExec
|
|
117
119
|
# Removes the age from the string to retrieve the original file name.
|
118
120
|
# @param filename_with_age [String] the modified file name with age
|
119
121
|
# @return [String] the original file name
|
120
|
-
def self.from_menu(
|
122
|
+
def self.from_menu(dname)
|
123
|
+
filename_with_age = dname.gsub(/\033\[[\d;]+m|\033\[0m/, '')
|
121
124
|
filename_with_age.split(': ', 2).last
|
122
125
|
end
|
123
126
|
end
|
@@ -341,7 +344,14 @@ module MarkdownExec
|
|
341
344
|
# Reports and executes block logic
|
342
345
|
def execute_block_logic(files)
|
343
346
|
@options[:filename] = select_document_if_multiple(files)
|
344
|
-
@options.
|
347
|
+
@options.document_inpseq
|
348
|
+
rescue StandardError
|
349
|
+
error_handler('execute_block_logic')
|
350
|
+
# rubocop:disable Style/RescueStandardError
|
351
|
+
rescue
|
352
|
+
pp $!, $@
|
353
|
+
exit 1
|
354
|
+
# rubocop:enable Style/RescueStandardError
|
345
355
|
end
|
346
356
|
|
347
357
|
## Executes the block specified in the options
|
@@ -506,7 +516,7 @@ module MarkdownExec
|
|
506
516
|
opts.banner = [
|
507
517
|
"#{MarkdownExec::APP_NAME}" \
|
508
518
|
" - #{MarkdownExec::APP_DESC} (#{MarkdownExec::VERSION})",
|
509
|
-
"Usage: #{executable_name} [(
|
519
|
+
"Usage: #{executable_name} [(directory | file [block_name] | search_keyword)] [options]"
|
510
520
|
].join("\n")
|
511
521
|
|
512
522
|
menu_iter do |item|
|
@@ -553,7 +563,7 @@ module MarkdownExec
|
|
553
563
|
}
|
554
564
|
when 'show_config'
|
555
565
|
->(_) {
|
556
|
-
finalize_cli_argument_processing(
|
566
|
+
finalize_cli_argument_processing([])
|
557
567
|
@fout.fout options.sort_by_key.to_yaml
|
558
568
|
}
|
559
569
|
when 'val_as_bool'
|
@@ -710,7 +720,7 @@ module MarkdownExec
|
|
710
720
|
|
711
721
|
saved_name_split filename
|
712
722
|
@options[:save_executed_script] = false
|
713
|
-
@options.
|
723
|
+
@options.document_inpseq
|
714
724
|
rescue StandardError
|
715
725
|
error_handler('run_last_script')
|
716
726
|
end
|
@@ -739,7 +749,6 @@ module MarkdownExec
|
|
739
749
|
def select_option_or_exit(prompt_text, strings, opts = {})
|
740
750
|
result = @options.select_option_with_metadata(prompt_text, strings,
|
741
751
|
opts)
|
742
|
-
### 2024-04-20 what for?
|
743
752
|
# return unless result.fetch(:option, nil)
|
744
753
|
|
745
754
|
result[:selected]
|
@@ -776,7 +785,7 @@ module MarkdownExec
|
|
776
785
|
|
777
786
|
saved_name_split(filename)
|
778
787
|
|
779
|
-
@options.
|
788
|
+
@options.document_inpseq ### ({ save_executed_script: false })
|
780
789
|
end
|
781
790
|
|
782
791
|
public
|
data/lib/menu.src.yml
CHANGED
@@ -106,28 +106,38 @@
|
|
106
106
|
:opt_name: display_level_xbase_prefix
|
107
107
|
:procname: val_as_str
|
108
108
|
|
109
|
-
# - :default: "(document_link)"
|
110
|
-
# :description: Name of Link block to load with the document
|
111
|
-
# :env_var: MDE_DOCUMENT_LOAD_LINK_BLOCK_NAME
|
112
|
-
# :opt_name: document_load_link_block_name
|
113
|
-
# :procname: val_as_str
|
114
|
-
|
115
109
|
- :default: "(document_options)"
|
116
110
|
:description: Name of Opts block to load with the document
|
117
111
|
:env_var: MDE_DOCUMENT_LOAD_OPTS_BLOCK_NAME
|
118
112
|
:opt_name: document_load_opts_block_name
|
119
113
|
:procname: val_as_str
|
120
114
|
|
115
|
+
- :arg_name: GLOB
|
116
|
+
:default: "document_configurations/%{document_filename}_*.sh"
|
117
|
+
:description: Glob for saved lines for a document
|
118
|
+
:env_var: MDE_DOCUMENT_SAVED_LINES_GLOB
|
119
|
+
:opt_name: document_saved_lines_glob
|
120
|
+
:procname: val_as_str
|
121
|
+
|
122
|
+
- :arg_name: BOOL
|
123
|
+
:default: true
|
124
|
+
:description: Add menu options for saved lines
|
125
|
+
:env_var: MDE_MENU_FOR_SAVED_LINES
|
126
|
+
:opt_name: menu_for_saved_lines
|
127
|
+
:procname: val_as_bool
|
128
|
+
|
121
129
|
- :arg_name: BOOL
|
122
130
|
:default: false
|
123
131
|
:description: Dump @delegate_object
|
124
|
-
:
|
132
|
+
:env_var: MDE_DUMP_DELEGATE_OBJECT
|
133
|
+
:long_name: dump-delegate-object
|
125
134
|
:opt_name: dump_delegate_object
|
126
135
|
:procname: val_as_bool
|
127
136
|
|
128
137
|
- :arg_name: BOOL
|
129
138
|
:default: false
|
130
139
|
:description: Dump BlocksInFile (stage 1)
|
140
|
+
:env_var: MDE_DUMP_BLOCKS_IN_FILE
|
131
141
|
:long_name: dump-blocks-in-file
|
132
142
|
:opt_name: dump_blocks_in_file
|
133
143
|
:procname: val_as_bool
|
@@ -135,27 +145,31 @@
|
|
135
145
|
- :arg_name: BOOL
|
136
146
|
:default: false
|
137
147
|
:description: Dump inherited block_names
|
138
|
-
:
|
148
|
+
:env_var: MDE_DUMP_INHERITED_BLOCK_NAMES
|
149
|
+
:long_name: dump-inherited-block_names
|
139
150
|
:opt_name: dump_inherited_block_names
|
140
151
|
:procname: val_as_bool
|
141
152
|
|
142
153
|
- :arg_name: BOOL
|
143
154
|
:default: false
|
144
155
|
:description: Dump inherited dependencies
|
145
|
-
:
|
156
|
+
:env_var: MDE_DUMP_INHERITED_DEPENDENCIES
|
157
|
+
:long_name: dump-inherited-dependencies
|
146
158
|
:opt_name: dump_inherited_dependencies
|
147
159
|
:procname: val_as_bool
|
148
160
|
|
149
161
|
- :arg_name: BOOL
|
150
162
|
:default: false
|
151
163
|
:description: Dump inherited lines
|
152
|
-
:
|
164
|
+
:env_var: MDE_DUMP_INHERITED_LINES
|
165
|
+
:long_name: dump-inherited-lines
|
153
166
|
:opt_name: dump_inherited_lines
|
154
167
|
:procname: val_as_bool
|
155
168
|
|
156
169
|
- :arg_name: BOOL
|
157
170
|
:default: false
|
158
171
|
:description: Dump MenuBlocks (stage 2)
|
172
|
+
:env_var: MDE_DUMP_MENU_BLOCKS
|
159
173
|
:long_name: dump-menu-blocks
|
160
174
|
:opt_name: dump_menu_blocks
|
161
175
|
:procname: val_as_bool
|
@@ -163,6 +177,7 @@
|
|
163
177
|
- :arg_name: BOOL
|
164
178
|
:default: false
|
165
179
|
:description: Dump selected block
|
180
|
+
:env_var: MDE_DUMP_SELECTED_BLOCK
|
166
181
|
:long_name: dump-selected-block
|
167
182
|
:opt_name: dump_selected_block
|
168
183
|
:procname: val_as_bool
|
@@ -212,8 +227,6 @@
|
|
212
227
|
:opt_name: exclude_expect_blocks
|
213
228
|
:procname: val_as_bool
|
214
229
|
|
215
|
-
# - :default: >
|
216
|
-
# osascript scripts/applescript/mde.applescript "%{batch_index}" "%{home}" " %{started_at} - %{document_filename} - %{block_name} " "%{script_filespec}" "%{output_filespec}"
|
217
230
|
- :default: >
|
218
231
|
osascript -e '
|
219
232
|
on run argv
|
@@ -285,7 +298,7 @@
|
|
285
298
|
:opt_name: fenced_start_and_end_regex
|
286
299
|
:procname: val_as_str
|
287
300
|
|
288
|
-
- :default: "^(?<indent> *)`{3,}(?<shell>[^`\\s]*)
|
301
|
+
- :default: "^(?<indent> *)`{3,}(?<shell>[^`\\s]*) *(:(?<name>[^\\s]*))? *(?<rest>.*) *$"
|
289
302
|
:description: Match the start of a fenced block
|
290
303
|
:env_var: MDE_FENCED_START_EXTENDED_REGEX
|
291
304
|
:opt_name: fenced_start_extended_regex
|
@@ -407,6 +420,14 @@
|
|
407
420
|
:opt_name: list_recent_scripts
|
408
421
|
:procname: val_as_bool
|
409
422
|
|
423
|
+
- :arg_name: PATH
|
424
|
+
:default: ''
|
425
|
+
:description: Load code
|
426
|
+
:env_var: MDE_LOAD_CODE
|
427
|
+
:long_name: load-code
|
428
|
+
:opt_name: load_code
|
429
|
+
:procname: val_as_str
|
430
|
+
|
410
431
|
- :arg_name: PREFIX
|
411
432
|
:default: mde
|
412
433
|
:description: Name prefix for stdout files
|
@@ -494,6 +515,13 @@
|
|
494
515
|
:opt_name: menu_exit_at_top
|
495
516
|
:procname: val_as_bool
|
496
517
|
|
518
|
+
- :arg_name: BOOL
|
519
|
+
:default: false
|
520
|
+
:description: Display Load option at top of menu (vs bottom)
|
521
|
+
:env_var: MDE_MENU_LOAD_AT_TOP
|
522
|
+
:opt_name: menu_load_at_top
|
523
|
+
:procname: val_as_bool
|
524
|
+
|
497
525
|
- :default:
|
498
526
|
:line: "~~~"
|
499
527
|
:description: closing demarcations for menu
|
@@ -622,6 +650,13 @@
|
|
622
650
|
:opt_name: menu_option_back_name
|
623
651
|
:procname: val_as_str
|
624
652
|
|
653
|
+
- :default:
|
654
|
+
:line: "* Edit"
|
655
|
+
:description: Text for Edit option
|
656
|
+
:env_var: MDE_MENU_OPTION_EDIT_NAME
|
657
|
+
:opt_name: menu_option_edit_name
|
658
|
+
:procname: val_as_str
|
659
|
+
|
625
660
|
- :default:
|
626
661
|
:line: "* Exit"
|
627
662
|
:description: Text for Exit option
|
@@ -629,6 +664,27 @@
|
|
629
664
|
:opt_name: menu_option_exit_name
|
630
665
|
:procname: val_as_str
|
631
666
|
|
667
|
+
- :default:
|
668
|
+
:line: "* Load"
|
669
|
+
:description: Text for Load option
|
670
|
+
:env_var: MDE_MENU_OPTION_LOAD_NAME
|
671
|
+
:opt_name: menu_option_load_name
|
672
|
+
:procname: val_as_str
|
673
|
+
|
674
|
+
- :default:
|
675
|
+
:line: "* Save"
|
676
|
+
:description: Text for Save option
|
677
|
+
:env_var: MDE_MENU_OPTION_SAVE_NAME
|
678
|
+
:opt_name: menu_option_save_name
|
679
|
+
:procname: val_as_str
|
680
|
+
|
681
|
+
- :default:
|
682
|
+
:line: "* View"
|
683
|
+
:description: Text for View option
|
684
|
+
:env_var: MDE_MENU_OPTION_VIEW_NAME
|
685
|
+
:opt_name: menu_option_view_name
|
686
|
+
:procname: val_as_str
|
687
|
+
|
632
688
|
- :default: fg_rgbh_ff_00_ff
|
633
689
|
:description: Color of menu opts
|
634
690
|
:env_var: MDE_MENU_OPTS_COLOR
|
@@ -710,7 +766,7 @@
|
|
710
766
|
:procname: val_as_bool
|
711
767
|
|
712
768
|
- :arg_name: BOOL
|
713
|
-
:default:
|
769
|
+
:default: false
|
714
770
|
:description: Display inherited lines in menu
|
715
771
|
:env_var: MDE_MENU_WITH_INHERITED_LINES
|
716
772
|
:opt_name: menu_with_inherited_lines
|
@@ -758,7 +814,6 @@
|
|
758
814
|
:default: false
|
759
815
|
:description: Display summary for execution
|
760
816
|
:env_var: MDE_OUTPUT_EXECUTION_SUMMARY
|
761
|
-
:long_name: output-execution-summary
|
762
817
|
:opt_name: output_execution_summary
|
763
818
|
:procname: val_as_bool
|
764
819
|
|
@@ -860,6 +915,12 @@
|
|
860
915
|
:opt_name: prompt_exit
|
861
916
|
:procname: val_as_str
|
862
917
|
|
918
|
+
- :default: Back
|
919
|
+
:description: Quit prompt
|
920
|
+
:env_var: MDE_PROMPT_FILESPEC_OTHER
|
921
|
+
:opt_name: prompt_filespec_back
|
922
|
+
:procname: val_as_str
|
923
|
+
|
863
924
|
- :default: Other
|
864
925
|
:description: Prompt for a custom file name
|
865
926
|
:env_var: MDE_PROMPT_FILESPEC_OTHER
|
@@ -946,7 +1007,6 @@
|
|
946
1007
|
:default: false
|
947
1008
|
:description: Wheter to save an executed script`
|
948
1009
|
:env_var: MDE_SAVE_EXECUTED_SCRIPT
|
949
|
-
:long_name: save-executed-script
|
950
1010
|
:opt_name: save_executed_script
|
951
1011
|
:procname: val_as_bool
|
952
1012
|
|
@@ -954,7 +1014,6 @@
|
|
954
1014
|
:default: false
|
955
1015
|
:description: Save standard output of the executed script
|
956
1016
|
:env_var: MDE_SAVE_EXECUTION_OUTPUT
|
957
|
-
:long_name: save-execution-output
|
958
1017
|
:opt_name: save_execution_output
|
959
1018
|
:procname: val_as_bool
|
960
1019
|
|
@@ -988,7 +1047,6 @@
|
|
988
1047
|
:default: logs
|
989
1048
|
:description: Folder where saved scripts are stored
|
990
1049
|
:env_var: MDE_SAVED_SCRIPT_FOLDER
|
991
|
-
:long_name: saved-script-folder
|
992
1050
|
:opt_name: saved_script_folder
|
993
1051
|
:procname: val_as_str
|
994
1052
|
|
@@ -1003,7 +1061,6 @@
|
|
1003
1061
|
:default: logs
|
1004
1062
|
:description: Saved stdout folder
|
1005
1063
|
:env_var: MDE_SAVED_STDOUT_FOLDER
|
1006
|
-
:long_name: saved-stdout-folder
|
1007
1064
|
:opt_name: saved_stdout_folder
|
1008
1065
|
:procname: val_as_str
|
1009
1066
|
|
data/lib/menu.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# MDE - Markdown Executor (2.0.
|
1
|
+
# MDE - Markdown Executor (2.0.6)
|
2
2
|
---
|
3
3
|
- :description: Show current configuration values
|
4
4
|
:procname: show_config
|
@@ -94,45 +94,64 @@
|
|
94
94
|
:env_var: MDE_DOCUMENT_LOAD_OPTS_BLOCK_NAME
|
95
95
|
:opt_name: document_load_opts_block_name
|
96
96
|
:procname: val_as_str
|
97
|
+
- :arg_name: GLOB
|
98
|
+
:default: document_configurations/%{document_filename}_*.sh
|
99
|
+
:description: Glob for saved lines for a document
|
100
|
+
:env_var: MDE_DOCUMENT_SAVED_LINES_GLOB
|
101
|
+
:opt_name: document_saved_lines_glob
|
102
|
+
:procname: val_as_str
|
103
|
+
- :arg_name: BOOL
|
104
|
+
:default: true
|
105
|
+
:description: Add menu options for saved lines
|
106
|
+
:env_var: MDE_MENU_FOR_SAVED_LINES
|
107
|
+
:opt_name: menu_for_saved_lines
|
108
|
+
:procname: val_as_bool
|
97
109
|
- :arg_name: BOOL
|
98
110
|
:default: false
|
99
111
|
:description: Dump @delegate_object
|
100
|
-
:
|
112
|
+
:env_var: MDE_DUMP_DELEGATE_OBJECT
|
113
|
+
:long_name: dump-delegate-object
|
101
114
|
:opt_name: dump_delegate_object
|
102
115
|
:procname: val_as_bool
|
103
116
|
- :arg_name: BOOL
|
104
117
|
:default: false
|
105
118
|
:description: Dump BlocksInFile (stage 1)
|
119
|
+
:env_var: MDE_DUMP_BLOCKS_IN_FILE
|
106
120
|
:long_name: dump-blocks-in-file
|
107
121
|
:opt_name: dump_blocks_in_file
|
108
122
|
:procname: val_as_bool
|
109
123
|
- :arg_name: BOOL
|
110
124
|
:default: false
|
111
125
|
:description: Dump inherited block_names
|
112
|
-
:
|
126
|
+
:env_var: MDE_DUMP_INHERITED_BLOCK_NAMES
|
127
|
+
:long_name: dump-inherited-block_names
|
113
128
|
:opt_name: dump_inherited_block_names
|
114
129
|
:procname: val_as_bool
|
115
130
|
- :arg_name: BOOL
|
116
131
|
:default: false
|
117
132
|
:description: Dump inherited dependencies
|
118
|
-
:
|
133
|
+
:env_var: MDE_DUMP_INHERITED_DEPENDENCIES
|
134
|
+
:long_name: dump-inherited-dependencies
|
119
135
|
:opt_name: dump_inherited_dependencies
|
120
136
|
:procname: val_as_bool
|
121
137
|
- :arg_name: BOOL
|
122
138
|
:default: false
|
123
139
|
:description: Dump inherited lines
|
124
|
-
:
|
140
|
+
:env_var: MDE_DUMP_INHERITED_LINES
|
141
|
+
:long_name: dump-inherited-lines
|
125
142
|
:opt_name: dump_inherited_lines
|
126
143
|
:procname: val_as_bool
|
127
144
|
- :arg_name: BOOL
|
128
145
|
:default: false
|
129
146
|
:description: Dump MenuBlocks (stage 2)
|
147
|
+
:env_var: MDE_DUMP_MENU_BLOCKS
|
130
148
|
:long_name: dump-menu-blocks
|
131
149
|
:opt_name: dump_menu_blocks
|
132
150
|
:procname: val_as_bool
|
133
151
|
- :arg_name: BOOL
|
134
152
|
:default: false
|
135
153
|
:description: Dump selected block
|
154
|
+
:env_var: MDE_DUMP_SELECTED_BLOCK
|
136
155
|
:long_name: dump-selected-block
|
137
156
|
:opt_name: dump_selected_block
|
138
157
|
:procname: val_as_bool
|
@@ -239,7 +258,7 @@
|
|
239
258
|
:env_var: MDE_FENCED_START_AND_END_REGEX
|
240
259
|
:opt_name: fenced_start_and_end_regex
|
241
260
|
:procname: val_as_str
|
242
|
-
- :default: "^(?<indent> *)`{3,}(?<shell>[^`\\s]*)
|
261
|
+
- :default: "^(?<indent> *)`{3,}(?<shell>[^`\\s]*) *(:(?<name>[^\\s]*))? *(?<rest>.*)
|
243
262
|
*$"
|
244
263
|
:description: Match the start of a fenced block
|
245
264
|
:env_var: MDE_FENCED_START_EXTENDED_REGEX
|
@@ -341,6 +360,13 @@
|
|
341
360
|
:long_name: list-recent-scripts
|
342
361
|
:opt_name: list_recent_scripts
|
343
362
|
:procname: val_as_bool
|
363
|
+
- :arg_name: PATH
|
364
|
+
:default: ''
|
365
|
+
:description: Load code
|
366
|
+
:env_var: MDE_LOAD_CODE
|
367
|
+
:long_name: load-code
|
368
|
+
:opt_name: load_code
|
369
|
+
:procname: val_as_str
|
344
370
|
- :arg_name: PREFIX
|
345
371
|
:default: mde
|
346
372
|
:description: Name prefix for stdout files
|
@@ -415,6 +441,12 @@
|
|
415
441
|
:env_var: MDE_MENU_EXIT_AT_TOP
|
416
442
|
:opt_name: menu_exit_at_top
|
417
443
|
:procname: val_as_bool
|
444
|
+
- :arg_name: BOOL
|
445
|
+
:default: false
|
446
|
+
:description: Display Load option at top of menu (vs bottom)
|
447
|
+
:env_var: MDE_MENU_LOAD_AT_TOP
|
448
|
+
:opt_name: menu_load_at_top
|
449
|
+
:procname: val_as_bool
|
418
450
|
- :default:
|
419
451
|
:line: "~~~"
|
420
452
|
:description: closing demarcations for menu
|
@@ -521,12 +553,36 @@
|
|
521
553
|
:env_var: MDE_MENU_OPTION_BACK_NAME
|
522
554
|
:opt_name: menu_option_back_name
|
523
555
|
:procname: val_as_str
|
556
|
+
- :default:
|
557
|
+
:line: "* Edit"
|
558
|
+
:description: Text for Edit option
|
559
|
+
:env_var: MDE_MENU_OPTION_EDIT_NAME
|
560
|
+
:opt_name: menu_option_edit_name
|
561
|
+
:procname: val_as_str
|
524
562
|
- :default:
|
525
563
|
:line: "* Exit"
|
526
564
|
:description: Text for Exit option
|
527
565
|
:env_var: MDE_MENU_OPTION_EXIT_NAME
|
528
566
|
:opt_name: menu_option_exit_name
|
529
567
|
:procname: val_as_str
|
568
|
+
- :default:
|
569
|
+
:line: "* Load"
|
570
|
+
:description: Text for Load option
|
571
|
+
:env_var: MDE_MENU_OPTION_LOAD_NAME
|
572
|
+
:opt_name: menu_option_load_name
|
573
|
+
:procname: val_as_str
|
574
|
+
- :default:
|
575
|
+
:line: "* Save"
|
576
|
+
:description: Text for Save option
|
577
|
+
:env_var: MDE_MENU_OPTION_SAVE_NAME
|
578
|
+
:opt_name: menu_option_save_name
|
579
|
+
:procname: val_as_str
|
580
|
+
- :default:
|
581
|
+
:line: "* View"
|
582
|
+
:description: Text for View option
|
583
|
+
:env_var: MDE_MENU_OPTION_VIEW_NAME
|
584
|
+
:opt_name: menu_option_view_name
|
585
|
+
:procname: val_as_str
|
530
586
|
- :default: fg_rgbh_ff_00_ff
|
531
587
|
:description: Color of menu opts
|
532
588
|
:env_var: MDE_MENU_OPTS_COLOR
|
@@ -595,7 +651,7 @@
|
|
595
651
|
:opt_name: menu_with_exit
|
596
652
|
:procname: val_as_bool
|
597
653
|
- :arg_name: BOOL
|
598
|
-
:default:
|
654
|
+
:default: false
|
599
655
|
:description: Display inherited lines in menu
|
600
656
|
:env_var: MDE_MENU_WITH_INHERITED_LINES
|
601
657
|
:opt_name: menu_with_inherited_lines
|
@@ -636,7 +692,6 @@
|
|
636
692
|
:default: false
|
637
693
|
:description: Display summary for execution
|
638
694
|
:env_var: MDE_OUTPUT_EXECUTION_SUMMARY
|
639
|
-
:long_name: output-execution-summary
|
640
695
|
:opt_name: output_execution_summary
|
641
696
|
:procname: val_as_bool
|
642
697
|
- :default: "%{name}: %{value}"
|
@@ -728,6 +783,11 @@
|
|
728
783
|
:env_var: MDE_PROMPT_EXIT
|
729
784
|
:opt_name: prompt_exit
|
730
785
|
:procname: val_as_str
|
786
|
+
- :default: Back
|
787
|
+
:description: Quit prompt
|
788
|
+
:env_var: MDE_PROMPT_FILESPEC_OTHER
|
789
|
+
:opt_name: prompt_filespec_back
|
790
|
+
:procname: val_as_str
|
731
791
|
- :default: Other
|
732
792
|
:description: Prompt for a custom file name
|
733
793
|
:env_var: MDE_PROMPT_FILESPEC_OTHER
|
@@ -809,14 +869,12 @@
|
|
809
869
|
:default: false
|
810
870
|
:description: Wheter to save an executed script`
|
811
871
|
:env_var: MDE_SAVE_EXECUTED_SCRIPT
|
812
|
-
:long_name: save-executed-script
|
813
872
|
:opt_name: save_executed_script
|
814
873
|
:procname: val_as_bool
|
815
874
|
- :arg_name: BOOL
|
816
875
|
:default: false
|
817
876
|
:description: Save standard output of the executed script
|
818
877
|
:env_var: MDE_SAVE_EXECUTION_OUTPUT
|
819
|
-
:long_name: save-execution-output
|
820
878
|
:opt_name: save_execution_output
|
821
879
|
:procname: val_as_bool
|
822
880
|
- :default: "/"
|
@@ -845,7 +903,6 @@
|
|
845
903
|
:default: logs
|
846
904
|
:description: Folder where saved scripts are stored
|
847
905
|
:env_var: MDE_SAVED_SCRIPT_FOLDER
|
848
|
-
:long_name: saved-script-folder
|
849
906
|
:opt_name: saved_script_folder
|
850
907
|
:procname: val_as_str
|
851
908
|
- :arg_name: GLOB
|
@@ -858,7 +915,6 @@
|
|
858
915
|
:default: logs
|
859
916
|
:description: Saved stdout folder
|
860
917
|
:env_var: MDE_SAVED_STDOUT_FOLDER
|
861
|
-
:long_name: saved-stdout-folder
|
862
918
|
:opt_name: saved_stdout_folder
|
863
919
|
:procname: val_as_str
|
864
920
|
- :arg_name: GLOB
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markdown_exec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fareed Stevenson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clipboard
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- bin/setup
|
114
114
|
- bin/tab_completion.sh
|
115
115
|
- bin/tab_completion.sh.erb
|
116
|
+
- examples/block_names.md
|
116
117
|
- examples/colors.md
|
117
118
|
- examples/document_options.md
|
118
119
|
- examples/duplicate_block.md
|
@@ -125,9 +126,11 @@ files:
|
|
125
126
|
- examples/linked1.md
|
126
127
|
- examples/linked2.md
|
127
128
|
- examples/linked3.md
|
129
|
+
- examples/linked_show.md
|
128
130
|
- examples/llm.md
|
129
131
|
- examples/load1.sh
|
130
132
|
- examples/load2.sh
|
133
|
+
- examples/load_code.md
|
131
134
|
- examples/nickname.md
|
132
135
|
- examples/opts.md
|
133
136
|
- examples/pass-through.md
|
@@ -144,6 +147,7 @@ files:
|
|
144
147
|
- lib/cached_nested_file_reader.rb
|
145
148
|
- lib/ce_get_cost_and_usage.rb
|
146
149
|
- lib/cli.rb
|
150
|
+
- lib/color_scheme.rb
|
147
151
|
- lib/colorize.rb
|
148
152
|
- lib/constants.rb
|
149
153
|
- lib/directory_searcher.rb
|