mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
Work around a problem with tmux has-session:
tmux has-session does a prefix match and not an exact match. When a session "ABC" does exist, the session "A" is also interpreted as "ABC" Using tmux list-sessions fixes this problem
This commit is contained in:
@@ -253,7 +253,7 @@ initialize_session() {
|
||||
tmuxifier-tmux start-server
|
||||
|
||||
# Check if the named session already exists.
|
||||
if tmuxifier-tmux has-session -t "$session:" 2>/dev/null; then
|
||||
if tmuxifier-tmux list-sessions | grep -q "^$session:"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user