-
Notifications
You must be signed in to change notification settings - Fork 285
Open
Description
Bug Description
When antigen generates the ~/.antigen/shell.zsh file, it includes a check for an existing Ruby helper process. If found, it uses exit 0 which terminates the entire shell session instead of just returning from the script.
The Problem
The generated shell.zsh contains:
[[ -f "$PID_FILE" ]] && PID=$(<"$PID_FILE") && [[ "$PID" =~ ^[0-9]+$ ]] && \
kill -0 "$PID" 2>/dev/null && ps -p "$PID" -o comm= | grep -q ruby && exit 0This causes the shell to completely exit when:
- Starting a new tmux window/pane
- Opening a new terminal tab
- Any situation where a new shell is spawned while the Ruby helper is already running
The Fix
Replace exit 0 with return 0:
[[ -f "$PID_FILE" ]] && PID=$(<"$PID_FILE") && [[ "$PID" =~ ^[0-9]+$ ]] && \
kill -0 "$PID" 2>/dev/null && ps -p "$PID" -o comm= | grep -q ruby && return 0Impact
This bug makes it impossible to create new tmux windows or terminal sessions when antigen's Ruby helper process is running, severely impacting usability.
Environment
- OS: macOS
- Shell: zsh 5.9
- Antigen: latest
- Tmux: 3.5
Workaround
Users can manually edit ~/.antigen/shell.zsh and change exit 0 to return 0, but this file may be regenerated by antigen.
Metadata
Metadata
Assignees
Labels
No labels