This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/tmux-save-buffer

12 lines
237 B
Plaintext
Raw Normal View History

2020-01-20 14:01:06 -06:00
#!/usr/bin/env sh
2020-04-09 22:09:00 -05:00
echo "${USER_LOGS_PATH}"
2019-08-23 09:45:26 -05:00
sess="$1"; shift
d="$(date +%Y-%m-%d_%H-%M-%S)"
2020-01-20 14:01:06 -06:00
f="${USER_LOGS_PATH}/${d}.${sess}.tmux-buffer.log"
2019-08-23 09:45:26 -05:00
touch "$f"
chmod 600 "$f"
tmux capture-pane -pS -1000000000 > "$f"
2020-04-09 22:09:00 -05:00
echo "Saved output to $f"