add exi function

This commit is contained in:
vincent 2021-08-11 21:36:56 +02:00
parent 16fa393488
commit 6cf67d13b7

View File

@ -69,7 +69,7 @@ alias _='sudo '
alias mpv='gnome-session-inhibit mpv'
#alias sortie de tmux en session ssh
alias exitTmux='tmux detach -P'
alias exitTmux=''
# open a session bitwarden
alias bwsession='export BW_SESSION="$(bw unlock --raw)"'
@ -81,3 +81,11 @@ function removeknowhost (){
sed -i "/^$1/d" ~/.ssh/known_hosts
fi
}
function exi (){
if [ -n "$TMUX" ]; then
tmux detach -P
else
exit
fi
}