iterm2 +mosh --> ssh server --> tmux
https://thoughtbot.com/blog/a-tmux-crash-course
bashrc :
cat ~/.bashrc
# .bashrc
# bashrc is for aliases, functions, and shell configuration intended for use in
# interactive shells. However, in some circumstances, bash sources bashrc even
# in non-interactive shells (e.g., when using scp), so it is standard practice
# to check for interactivity at the top of .bashrc and return immediately if
# the shell is not interactive. The following line does that; don't remove it!
[[ $- != *i* ]] && return
# Load CentOS stuff and
stuff (don't remove these lines).
source /etc/bashrc
source
# Keep oodles of command history
HISTFILESIZE=-1
HISTSIZE=1000000
shopt -s histappend
# Set up personal aliases, functions, etc.
# ...(put your own stuff here!)...
source $ADMIN_SCRIPTS/scm-prompt
export PS1=$PS1'$( [ -n "$TMUX" ] && tmux setenv -g TMUX_LOC_$(tmux display -p "#D" | tr -d %) "$(_dotfiles_scm_info) ")'
TMUX_OPTIONS="-CC"
if [[ ! $TMUX && -t 0 && $TERM_PROGRAM != nuclide ]]; then
tmux $TMUX_OPTIONS new-session -As auto
fi
.bash_profile
# Source bashrc to pull in configuration for interactive shell use (the bashrc
# will just return if the shell is not interactive).
if [[ -f ~/.bashrc ]]; then
source ~/.bashrc
fi
# Export environment variables, start background programs, etc.
export EDITOR=vi
export PATH=$PATH:$HOME/bin
.tmux.conf
set -g default-command "${SHELL}"
set -g history-limit 500000
set -g status-right "#{s/.
//:host} • %Y-%m-%d %H:%M"
set -s default-terminal "screen-256color"
set -s escape-time 0
set -g mouse on
set -g status-style "bg=colour17,fg=colour27"
set -g status-interval 1
set -g status-left-length 30
set -g status-left '#(~/bin/display_tmux_loc.sh)'