Skip to content

Instantly share code, notes, and snippets.

@matsuu matsuu/.sshrc
Created Sep 10, 2016

Embed
What would you like to do?
.sshrc for golang
export SHELL=`which bash`
export VIMINIT="let \$MYVIMRC='$SSHHOME/.sshrc.d/.vimrc' | source \$MYVIMRC"
MYNAME="matsuu"
SSHRCDIR="/tmp/.$MYNAME.sshrc"
VIMRUNTIME="${HOME}/.$MYNAME.vim"
if ! [ -d $SSHRCDIR ]; then
rm -rf $SSHRCDIR
mkdir -p $SSHRCDIR
fi
if ! [ -e "${VIMRUNTIME}/autoload/pathogen.vim" ]; then
mkdir -p "${VIMRUNTIME}/autoload"
mkdir -p "${VIMRUNTIME}/bundle"
curl -LSso "${VIMRUNTIME}/autoload/pathogen.vim" https://github.com/tpope/vim-pathogen/raw/master/autoload/pathogen.vim
fi
tmux() {
rm -rf $SSHRCDIR/.sshrc.d
cp -r $SSHHOME/.sshrc $SSHHOME/bashsshrc $SSHHOME/sshrc $SSHHOME/.sshrc.d $SSHRCDIR
SSHHOME=$SSHRCDIR SHELL=$SSHRCDIR/bashsshrc /usr/bin/tmux -f $SSHRCDIR/.sshrc.d/.tmux.conf -S $SSHRCDIR/tmuxserver "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.