Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/start_logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ system_osx() {
}

pipe_pane_ansifilter() {
tmux pipe-pane "exec cat - | ansifilter >> $FILE"
tmux pipe-pane "exec ansifilter >> $FILE"
}

pipe_pane_sed_osx() {
# Warning, very complex regex ahead.
# Some characters below might not be visible from github web view.
local ansi_codes_osx="(\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]||]0;[^]+|[[:space:]]+$)"
tmux pipe-pane "exec cat - | sed -E \"s/$ansi_codes_osx//g\" >> $FILE"
tmux pipe-pane "exec sed -E \"s/$ansi_codes_osx//g\" >> $FILE"
}

pipe_pane_sed() {
local ansi_codes="(\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]|)"
tmux pipe-pane "exec cat - | sed -r 's/$ansi_codes//g' >> $FILE"
tmux pipe-pane "exec sed -r 's/$ansi_codes//g' >> $FILE"
}

start_pipe_pane() {
Expand Down