lib/menu.src.yml in markdown_exec-1.8.7 vs lib/menu.src.yml in markdown_exec-1.8.8

- old
+ new

@@ -1,12 +1,12 @@ --- - :description: Show current configuration values :procname: show_config - :short_name: "0" + :short_name: '0' - :arg_name: BOOL - :default: false + :default: true :description: Display only blocks of type "bash" :env_var: MDE_BASH_ONLY :opt_name: bash_only :procname: val_as_bool @@ -28,21 +28,27 @@ :description: Pattern for blocks to hide from user-selection :env_var: MDE_BLOCK_NAME_HIDDEN_MATCH :opt_name: block_name_hidden_match :procname: val_as_str -- :default: "^[\\(\\[].*[\\)\\]]$" +- :default: "^\\(.*\\)$" :description: Pattern for blocks to hide from user-selection :env_var: MDE_BLOCK_NAME_INCLUDE_MATCH :opt_name: block_name_include_match :procname: val_as_str - :default: ":(?<title>\\S+)( |$)" :env_var: MDE_BLOCK_NAME_MATCH :opt_name: block_name_match :procname: val_as_str +- :default: "^\\[.*\\]$" + :description: Pattern for block nicknames (name is not used in menu) + :env_var: MDE_BLOCK_NAME_NICK_MATCH + :opt_name: block_name_nick_match + :procname: val_as_str + - :default: "^{.+}$" :description: Pattern for block names to use as wrappers :env_var: MDE_BLOCK_NAME_WRAPPER_MATCH :opt_name: block_name_wrapper_match :procname: val_as_str @@ -72,10 +78,17 @@ :description: Read configuration file :long_name: config :procname: path - :arg_name: BOOL + :default: true + :description: debounce_execution + :env_var: MDE_debounce_execution + :opt_name: debounce_execution + :procname: val_as_bool + +- :arg_name: BOOL :default: false :description: Debug output :env_var: MDE_DEBUG :long_name: debug :procname: debug @@ -175,10 +188,72 @@ :description: Hide all blocks of type "expect" :env_var: MDE_EXCLUDE_EXPECT_BLOCKS :opt_name: exclude_expect_blocks :procname: val_as_bool +- :default: > + osascript -e ' + tell application "iTerm" + tell application "System Events" + tell application "Finder" + set {posx, posy, screenWidth, screenHeight} to bounds of window of desktop + end tell + tell application process "Finder" + set {missing value, menubarHeight} to the size of menu bar 1 + end tell + end tell + + set winHeight to (screenHeight * 2 / 3) + set winWidth to (screenWidth / 2) + set xoff to menubarHeight * %{batch_index} + set yoff to xoff mod (screenHeight - winHeight) + + create window with default profile + tell the first window + set bounds to {xoff, yoff, xoff + winWidth, yoff + winHeight} + tell the current session + write text "alias cat_script=\"cat -n \\\"%{script_filespec}\\\"\"" + write text "alias less_script=\"less \\\"%{script_filespec}\\\"\"" + write text "alias run_script=\"%{script_filespec}\"" + write text "alias vim_script=\"vim \\\"%{script_filespec}\\\"\"" + delay 1 + + write text "alias cat_output=\"cat -n \\\"%{output_filespec}\\\"\"" + write text "alias grep_output=\"read -p Pattern: pattern && grep \\\"\\$pattern\\\" \\\"%{output_filespec}\\\"\"" + write text "alias less_output=\"less \\\"%{output_filespec}\\\"\"" + delay 1 + + write text "alias menu=\"select cmd in cat_script less_script run_script vim_script cat_output grep_output less_output exit; do eval \\\"\\$cmd\\\"; done\"" + delay 1 + + write text "echo -ne \"\\033]; %{started_at} - %{document_filename} - %{block_name} \\007\"" + write text "cd \"%{home}\"" + write text "\"%{script_filename}\" | tee \"%{output_filespec}\"" + delay 2 + + write text "menu" + end tell + end tell + end tell' + :description: execute_command_format + :env_var: MDE_EXECUTE_COMMAND_FORMAT + :opt_name: execute_command_format + :procname: val_as_str + +- :default: "%T" + :description: Format for time in window title + :env_var: MDE_EXECUTE_COMMAND_TITLE_TIME_FORMAT + :opt_name: execute_command_title_time_format + :procname: val_as_str + +- :arg_name: BOOL + :default: true + :description: Execute script in own window + :env_var: MDE_EXECUTE_IN_OWN_WINDOW + :opt_name: execute_in_own_window + :procname: val_as_bool + - :default: fg_rgbh_7f_ff_00 :description: execution_report_preview_frame_color :env_var: MDE_EXECUTION_REPORT_PREVIEW_FRAME_COLOR :opt_name: execution_report_preview_frame_color :procname: val_as_str @@ -222,18 +297,18 @@ :opt_name: filename :procname: val_as_str :short_name: f - :arg_name: FIND - :default: "" + :default: '' :description: Find in documents :long_name: find :procname: find :short_name: "?" - :arg_name: FIND_PATH - :default: "" + :default: '' :description: Path for find (uses PATH if empty) :env_var: MDE_FIND_PATH :long_name: find-path :opt_name: find_path :procname: val_as_str @@ -276,16 +351,21 @@ :env_var: MDE_HISTORY_PROPERTY_SEPARATOR :opt_name: history_property_separator :procname: val_as_str - :arg_name: HOW - :default: "" + :default: '' :description: Find in YAML configuration options :long_name: how :procname: how :short_name: "?" +- :default: + :env_var: MDE_IMPORT_PATHS + :opt_name: import_paths + :procname: val_as_str + - :default: "^ *@import +(?<name>.+?) *$" :env_var: MDE_IMPORT_PATTERN :opt_name: import_pattern :procname: val_as_str @@ -453,11 +533,11 @@ :description: format for menu heading3 in menu :env_var: MDE_MENU_HEADING3_FORMAT :opt_name: menu_heading3_format :procname: val_as_str -- :default: "0" +- :default: '0' :description: Import levels for blocks to appear in menu. Empty is all. :env_var: MDE_MENU_IMPORT_LEVEL_MATCH :opt_name: menu_import_level_match :procname: val_as_str @@ -494,11 +574,11 @@ :env_var: MDE_MENU_INHERITED_LINES_FORMAT :opt_name: menu_inherited_lines_format :procname: val_as_str - :default: - :line: "" + :line: '' :description: opening demarcation for menu :env_var: MDE_MENU_INITIAL_DIVIDER :opt_name: menu_initial_divider :procname: val_as_str @@ -640,10 +720,30 @@ :description: Hide decorative menu entries :env_var: MDE_NO_CHROME :opt_name: no_chrome :procname: val_as_bool +- :default: + :description: Expression to match to start collecting lines + :env_var: MDE_OUTPUT_ASSIGNMENT_BEGIN + :opt_name: output_assignment_begin + :procname: val_as_str +- :default: + :description: Expression to match to stop collecting lines + :env_var: MDE_OUTPUT_ASSIGNMENT_END + :opt_name: output_assignment_begin + :procname: val_as_str +- :default: "%{line} # !!!" + :description: Format for assignments from output + :env_var: MDE_OUTPUT_ASSIGNMENT_FORMAT + :opt_name: output_assignment_format + :procname: val_as_str +- :default: "^ *(\\w+=.*?) *$" + :description: Pattern for assignments from output + :env_var: MDE_OUTPUT_ASSIGNMENT_MATCH + :opt_name: output_assignment_match + :procname: val_as_str - :arg_name: BOOL :default: false :description: Display summary for execution :env_var: MDE_OUTPUT_EXECUTION_SUMMARY :long_name: output-execution-summary @@ -704,11 +804,11 @@ :opt_name: path :procname: val_as_str :short_name: p - :arg_name: BOOL - :default: true + :default: false :description: Wheter to pause after manually executing a block and the next menu :env_var: MDE_PAUSE_AFTER_SCRIPT_EXECUTION :opt_name: pause_after_script_execution :procname: val_as_bool @@ -728,17 +828,23 @@ :description: Color of prompt after script execution :env_var: MDE_PROMPT_COLOR_AFTER_SCRIPT_EXECUTION :opt_name: prompt_color_after_script_execution :procname: val_as_str +- :default: "\nRepeat this block?" + :description: Prompt to debounce + :env_var: MDE_PROMPT_DEBOUNCE + :opt_name: prompt_debounce + :procname: val_as_str + - :default: Exit :description: Prompt to exit app :env_var: MDE_PROMPT_EXIT :opt_name: prompt_exit :procname: val_as_str -- :default: "No" +- :default: 'No' :description: Prompt for no :env_var: MDE_PROMPT_NO :opt_name: prompt_no :procname: val_as_str @@ -770,11 +876,17 @@ :description: Prompt to select a saved file :env_var: MDE_PROMPT_SELECT_OUTPUT :opt_name: prompt_select_output :procname: val_as_str -- :default: "Yes" +- :default: Uninterrupted + :description: Uninterrupted execution + :env_var: MDE_PROMPT_UNINTERRUPTED + :opt_name: prompt_uninterrupted + :procname: val_as_str + +- :default: 'Yes' :description: Prompt for yes :env_var: MDE_PROMPT_YES :opt_name: prompt_yes :procname: val_as_str @@ -787,11 +899,11 @@ :long_name: run-last-script :opt_name: run_last_script :procname: val_as_bool - :default: 1 - :description: "Runtime exception error level (warn if < 0, ignore if 0, abort if > 0)" + :description: Runtime exception error level (warn if < 0, ignore if 0, abort if > 0) :env_var: MDE_RUNTIME_EXCEPTION_ERROR_LEVEL :opt_name: runtime_exception_error_level :procname: val_as_int - :arg_name: BOOL @@ -915,11 +1027,11 @@ :env_var: MDE_SELECT_BY_SHELL_REGEX :opt_name: select_by_shell_regex :procname: val_as_str - :default: 36 - :description: "Maximum # of rows in select list" + :description: 'Maximum # of rows in select list' :env_var: MDE_SELECT_PAGE_HEIGHT :opt_name: select_page_height :procname: val_as_int - :description: Select and execute a recently saved output @@ -942,17 +1054,17 @@ :description: Shell for launched scripts :env_var: MDE_SHELL :opt_name: shell :procname: val_as_str -- :default: "# -^- +%{block_name} -o- %{document_filename} -^-" +- :default: "# -^-" :description: shell_code_label_format_above :env_var: MDE_SHELL_CODE_LABEL_FORMAT_ABOVE :opt_name: shell_code_label_format_above :procname: val_as_str -- :default: "# -v- +%{block_name} -v-" +- :default: "# -v- +%{block_name} -o- %{document_filename} -v-" :description: shell_code_label_format_below :env_var: MDE_SHELL_CODE_LABEL_FORMAT_BELOW :opt_name: shell_code_label_format_below :procname: val_as_str @@ -960,11 +1072,11 @@ :long_name: tab-completions :opt_name: tab_completions :procname: val_as_bool - :arg_name: BOOL - :default: true + :default: false :description: Requires user approval before executing a script :env_var: MDE_USER_MUST_APPROVE :long_name: user-must-approve :opt_name: user_must_approve :procname: val_as_bool @@ -979,10 +1091,10 @@ :description: Color of warning message :env_var: MDE_WARNING_COLOR :opt_name: warning_color :procname: val_as_str -- :default: "Error: %{error}" +- :default: 'Error: %{error}' :description: Format of warning message :env_var: MDE_WARNING_FORMAT :opt_name: warning_format :procname: val_as_str