Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@iorionda
Created February 15, 2012 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iorionda/1833519 to your computer and use it in GitHub Desktop.
Save iorionda/1833519 to your computer and use it in GitHub Desktop.
tmux_ssh, man_ssh
# terminalの中でsshしたら新しいwindowを作成する
if [ "$TERM" = "screen-256color-bce" ];then
function ssh_tmux() {
eval server=\${$#}
tmux new-window -n $@ "exec ssh $@"
}
alias ssh=ssh_tmux
fi
# terminalの中でmanをしたら新しいpainを作成する
if [ "$TERM" = "screen-256color-bce" ];then
function man_tmux() {
eval server=\${$#}
tmux split-window "exec man $@"
}
alias man=man_tmux
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment