From 7da09083b0d37c60cde5c5901ec0b1d33549f9bc Mon Sep 17 00:00:00 2001 From: Parham Alvani Date: Mon, 4 Nov 2024 10:45:27 +0000 Subject: [PATCH] feat: add org name when pane is duplicate --- tmux/tmuxs/new.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tmux/tmuxs/new.sh b/tmux/tmuxs/new.sh index d3cc0e51d..966330c26 100755 --- a/tmux/tmuxs/new.sh +++ b/tmux/tmuxs/new.sh @@ -160,6 +160,9 @@ fi cd - prefix=0 +if tmux has-session -t "$current_session:=$name 📁" &>/dev/null; then + name="${org_name}/${name}" +fi while tmux has-session -t "$current_session:=$name 📁" &>/dev/null; do name="${name}_${prefix}" prefix=$((prefix + 1))