Skip to content

Instantly share code, notes, and snippets.

@geta6
Created October 19, 2011 00:48
Show Gist options
  • Save geta6/1297204 to your computer and use it in GitHub Desktop.
Save geta6/1297204 to your computer and use it in GitHub Desktop.
screen x zsh
preexec () {
if [ ${WINDOW} ]; then
echo -ne "\ek${1%% *}\e\\"
fi
}
if [ ! ${WINDOW} ]; then
cd $HOME/Library/Rcfiles/; git pull &; cd
case "${HOST}" in
GtxAir* )
alias s="ssh geta6.net"
;;
* )
alias s="screen -D -RR"
[ ${STY} ] || screen -rx || screen -D -RR
;;
esac
else
alias s="screen -d"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment