Skip to content

Instantly share code, notes, and snippets.

@sashaaro
Last active March 16, 2023 07:12
Show Gist options
  • Save sashaaro/1b53df13b81991aec43b5963af760ebd to your computer and use it in GitHub Desktop.
Save sashaaro/1b53df13b81991aec43b5963af760ebd to your computer and use it in GitHub Desktop.
asciinema terminal record for ssh session
# .barshrc
if [[ $- =~ i ]] && [[ -z "$ASCIINEMA_REC" ]] && [[ -n "$SSH_TTY" ]]; then
asciinema rec -q "$HOME/$(date +"%FT%T")_$RANDOM.cast"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment