tmux-tanlog
is a tmux/zsh version of tanlog (It's original GNU Screen
version).
This tool saves console outputs into text files in /tmp/tanlog/
. It depends
on tmux
and zsh
.
$ git clone https://github.com/r6eve/tmux-tanlog.git
$ cd tmux-tanlog
$ cargo install --path .
See Releases. tmux-tanlog-${version}-x86_64-unknown-linux-musl
is
statically linked binary.
yay -S tmux-tanlog-bin
And add the following to your .zshrc
tanlog_begin() { export TANLOG_LOGFILE=$(tmux-tanlog start "$1") }
tanlog_end() { tmux-tanlog end $TANLOG_LOGFILE }
typeset -Uga preexec_functions
typeset -Uga precmd_functions
preexec_functions+=tanlog_begin
precmd_functions+=tanlog_end
Output directory defaults to /tmp/tanlog
. Set the environment variable
TANLOG_DIR
if you want to change it.