kein neues tmux fenster mehr automatisch bei ssh

This commit is contained in:
Julian Scharrenbach 2018-07-12 07:51:36 +02:00
parent 914c8a78a6
commit 0183a5f581

40
.bashrc
View File

@ -107,26 +107,26 @@ export elements="$HOME/elements"
export develop="$HOME/elements/develop" export develop="$HOME/elements/develop"
# ssh using a new window when we are in TMUX # ssh using a new window when we are in TMUX
SSHEXEC=$(which ssh) #SSHEXEC=$(which ssh)
ssh() { #ssh() {
if [ -n "$TMUX" ] # if [ -n "$TMUX" ]
then # then
title="$*" # title="$*"
#if [ "$1" = -t ] # #if [ "$1" = -t ]
#then # #then
# title="$2" # # title="$2"
# shift 2 # # shift 2
#fi # #fi
#if [ "$1" = "stay" ] # #if [ "$1" = "stay" ]
#then # #then
# "$SSHEXEC $@" # # "$SSHEXEC $@"
#else # #else
tmux new-window -n "$title" "$SSHEXEC $( echo $@ | sed 's/stay//')" # tmux new-window -n "$title" "$SSHEXEC $( echo $@ | sed 's/stay//')"
#fi # #fi
else # else
$SSHEXEC $@ # $SSHEXEC $@
fi # fi
} #}
# colorful manpages # colorful manpages
export LESS_TERMCAP_mb=$'\e[1;32m' export LESS_TERMCAP_mb=$'\e[1;32m'