Skip to content

Instantly share code, notes, and snippets.

@vancluever
Created January 4, 2018 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vancluever/0ee530316f30d8b7d836a1fce3704ab6 to your computer and use it in GitHub Desktop.
Save vancluever/0ee530316f30d8b7d836a1fce3704ab6 to your computer and use it in GitHub Desktop.
Add a recording signal to your bash prompt if you are using asciinema
if [ -n "${ASCIINEMA_REC}" ]; then
PS1='[\[\e[31m\]•REC\[\e[0m\] \W]\$ '
else
PS1='[\u@\h \W]\$ '
fi
@vancluever
Copy link
Author

This needs to go into your .bashrc, or somewhere where it can override PS1 correctly. You will want to ensure it gets run when you launch into the shell session being wrapped by asciinema as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment