2022-01-30 07:22:24 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-08-17 12:37:26 -05:00
|
|
|
x=$(tmux capture-pane -p -S '-' -J -t !)
|
2022-08-17 00:54:46 -05:00
|
|
|
PROMPT_PATTERN=${1:-' ) '}
|
|
|
|
result=$(echo "$x" | tac | sed -e "0,/$PROMPT_PATTERN/d" | sed "/$PROMPT_PATTERN/,\$d" | tac)
|
2022-08-17 12:37:26 -05:00
|
|
|
echo -n "$result" | xsel -ib
|