-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.sshrc
28 lines (23 loc) · 889 Bytes
/
.sshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# vim: filetype=sh :
#export VIMINIT="let \$MYVIMRC='$SSHHOME/.sshrc.d/.vimrc' | source \$MYVIMRC"
# do not use it! or you will setup all of vim plugins with dein.vim when type vim
shopt -s expand_aliases
export XDG_CONFIG_HOME="$SSHHOME/.sshrc.d/.config"
. "$SSHHOME/.sshrc.d/.bashrc"
. "$SSHHOME/.sshrc.d/.aliases"
. "$SSHHOME/.sshrc.d/.functions"
[[ "$(command -v prompts)" ]] && prompts
if [[ "$(command -v tmux)" ]]; then
tmuxrc() {
local TMUXDIR=/tmp/.$(whoami)-tmux-server
if ! [ -d $TMUXDIR ]; then
rm -rf $TMUXDIR
mkdir -m 700 $TMUXDIR
fi
rm -rf $TMUXDIR/.sshrc.d
cp -r "$SSHHOME/.sshrc" "$SSHHOME/bashsshrc" "$SSHHOME/sshrc" "$SSHHOME/.sshrc.d" "$TMUXDIR"
SSHHOME="$TMUXDIR" SHELL="$TMUXDIR/bashsshrc" /usr/bin/tmux -S "$TMUXDIR/tmuxserver" -f "$TMUXDIR/.sshrc.d/.tmux.conf" "$@"
}
export SHELL=$(which bash)
alias tmux=tmuxrc
fi