fix: terminal hangs, right arrow blocking, and runaway iris processes (#142)
closes #137 - right arrow consumed the escape sequence without forwarding it, so the cursor couldn't move back right after moving left (60149a2) - p10k's instant prompt redirects stdout to a temp file that exec iris inherits, sending the overlay there instead of the terminal and looking like a dead keyboard. Reopens /dev/tty when stdout isn't a terminal (7ebbb0c) - zsh/bash autostart lacked the interactivity check fish already had, so agentic tools sourcing your rc file spawned a rogue iris that seized /dev/tty (5fe58be)
This commit is contained in:
+6
-2
@@ -31,7 +31,9 @@ if [ -n "$IRIS_PID" ] && [ "$IRIS_PID" != "$PPID" ] && [ "${TTY:-$(tty 2>/dev/nu
|
||||
unset IRIS_PID IRIS_IS_CHILD IRIS_FD IRIS_TTY
|
||||
fi
|
||||
|
||||
if [ -z "$IRIS_PID" ] && [ -z "$IRIS_RESCUE" ]; then
|
||||
# a non-interactive shell (tool runners sourcing rc files, scripts) has no
|
||||
# prompt to complete, and exec'ing here would seize the tty from the real iris
|
||||
if [[ -o interactive ]] && [ -t 0 ] && [ -z "$IRIS_PID" ] && [ -z "$IRIS_RESCUE" ]; then
|
||||
export IRIS_ACTIVE_SHELL="zsh"
|
||||
exec iris
|
||||
fi
|
||||
@@ -74,7 +76,9 @@ if [ -n "$IRIS_PID" ] && [ "$IRIS_PID" != "$PPID" ] && [ "$(tty 2>/dev/null)" !=
|
||||
unset IRIS_PID IRIS_IS_CHILD IRIS_FD IRIS_TTY
|
||||
fi
|
||||
|
||||
if [ -z "$IRIS_PID" ] && [ -z "$IRIS_RESCUE" ]; then
|
||||
# a non-interactive shell (tool runners sourcing rc files, scripts) has no
|
||||
# prompt to complete, and exec'ing here would seize the tty from the real iris
|
||||
if [[ $- == *i* ]] && [ -t 0 ] && [ -z "$IRIS_PID" ] && [ -z "$IRIS_RESCUE" ]; then
|
||||
export IRIS_ACTIVE_SHELL="bash"
|
||||
exec iris
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user