add(fish): tmux_last

This commit is contained in:
Léana 江 2023-11-09 21:45:07 +01:00 committed by Léana 江
parent 4eb662e46c
commit 8ccf640808
4 changed files with 27 additions and 12 deletions

View file

@ -11,8 +11,8 @@ function tmux_attach --description "attach to existing tmux sessions"
return 0
end
# attach or switch
if [ -z "$TMUX" ]
set -U TMUX_LAST (tmux display-message -p '#S')
if [ -z $TMUX ]
tmux attach-session -t $selected
else
tmux switch-client -t $selected