mirror of
https://github.com/tmux-plugins/tmux-logging.git
synced 2026-09-10 07:16:28 -04:00
Merge 3a4b0c886b into b5c5f7b9bc
This commit is contained in:
commit
c55ab1b35a
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue