From 6cf67d13b78aa53de2e22ba4fc97a116f13f8b6e Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 11 Aug 2021 21:36:56 +0200 Subject: [PATCH] add exi function --- zsh/.zshrc.d/alias | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc.d/alias b/zsh/.zshrc.d/alias index 9871455..92d8b51 100644 --- a/zsh/.zshrc.d/alias +++ b/zsh/.zshrc.d/alias @@ -33,9 +33,9 @@ alias du='du -h' alias df='df -h' alias rr='rm -r' alias rrf='rm -rf' -#set commande filebot +#set commande filebot alias trieserie='filebot --format "/mnt/diskstation/media/serie/{n}/Saison {s}/{e.pad(2)}-{t}/{s.pad(2)}x{e.pad(2)}-{t}" --db thetvdb -non-strict --lang fr -rename -no-xattr' -alias triefilm='filebot --format "/mnt/diskstation/media/film/{n} ({y})/{n}" --db themoviedb --lang fr -rename -non-strict -no-xattr' +alias triefilm='filebot --format "/mnt/diskstation/media/film/{n} ({y})/{n}" --db themoviedb --lang fr -rename -non-strict -no-xattr' alias cleaner='filebot -script fn:cleaner .' #synchro music directory for laptop @@ -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 +}