(startMarker: string, endMarker: string)
| 57 | } |
| 58 | |
| 59 | getSetupScript(startMarker: string, endMarker: string): string { |
| 60 | const cleanup = this.getCleanupScript(); |
| 61 | return `__TM=0; function __tc() { ${cleanup} }; function __tpc() { if [[ $__TM -eq 0 ]]; then local e=$?; local c=$(HISTTIMEFORMAT='' history 1 | awk '{$1=""; print substr($0,2)}'); if [[ "$c" == *"${startMarker}"* ]]; then __TM=1; echo "${endMarker}"; echo "exit_code: $e"; __tc; fi; fi }; trap - DEBUG 2>/dev/null; PROMPT_COMMAND=$(echo "$PROMPT_COMMAND" | sed 's/__tpc;//g'); PROMPT_COMMAND="__tpc;$PROMPT_COMMAND"`; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /** |
nothing calls this directly
no test coverage detected