Skip to content

Instantly share code, notes, and snippets.

@YoloClin
YoloClin / zshrc
Created September 19, 2019 10:23
source ~/.bashrc
# Be careful with this, if you breakt it you won't be able to open terminals!
if [ "$(ps -ocommand= -p $PPID | awk '{print $1}')" != 'script' ] ; then
script -q -f $HOME/.shell_logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log && exit
fi ;
# Disable escaping of URLs and stuff (significant speed improvement)
DISABLE_MAGIC_FUNCTIONS=true
@YoloClin
YoloClin / bashrc
Last active September 19, 2019 10:17
# When opening interactive ssh session, automatically open tmux
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
tmux new -A -t ssh_tmux && exit
fi
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi