tmux workaround

This commit is contained in:
iceBear67
2025-03-22 16:06:56 +08:00
parent ae52d5a18f
commit 8566091b85
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
build.sh
.idea
+1
View File
@@ -0,0 +1 @@
.idea/*
+4
View File
@@ -11,6 +11,10 @@ if ! cat /etc/passwd | grep -E "^user"
end
function resume
if test $(sudo -u user tmux list-windows | wc -l) -eq 0
sudo -u user tmux
return
end
if sudo -u user tmux has-session -t 0
if sudo -u user tmux ls | grep -E "^0.*attached)"
echo "The default tmux session has been attached, dropping you to a normal shell."