This commit is contained in:
Daniel Flanagan 2023-07-08 01:30:19 -05:00
parent 97fcd4b8c7
commit 08a40f4ad5
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -59,10 +59,11 @@ end
# If we're running the shell interactively from inside Kitty, assume that we will be using Kitty's multiplexing features # If we're running the shell interactively from inside Kitty, assume that we will be using Kitty's multiplexing features
# Otherwise, assume we're in a context that is not capable of "native" multiplexing features and run everything inside Zellij # Otherwise, assume we're in a context that is not capable of "native" multiplexing features and run everything inside Zellij
if set --query FISH_START_ZELLIJ if set --query FISH_START_ZELLIJ && status is-interactive
set ZELLIJ_AUTO_ATTACH true # simulate auto attach
set ZELLIJ_AUTO_EXIT true zellij attach -c || zellij attach -c (zellij list-sessions | grep -v '(current)' | head -n 1) || zellij
eval (zellij setup --generate-auto-start fish | string collect) # simulate auto kill
else if set --query FISH_START_TMUX kill $fish_pid
else if set --query FISH_START_TMUX && status is-interactive
tmux att -t default || tmux new -s default tmux att -t default || tmux new -s default
end end