From 2e8cefb22a4cef69ccd54bfb0f61d565941b4d16 Mon Sep 17 00:00:00 2001 From: afonso Date: Sat, 5 Oct 2024 13:09:33 +0100 Subject: [PATCH] [zsh] only capture SIGUSR1 if not a tty --- .config/zsh/.zshenv | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 661f7d7..cf54b27 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -1,10 +1,11 @@ #This is used to reload the instance -TRAPUSR1() { - if [[ -o INTERACTIVE ]]; then - exec "${SHELL}" - fi +if [[ ! $(tty) =~ ^/dev/tty[0-9]*$ ]]; then + TRAPUSR1() { + if [[ -o INTERACTIVE ]]; then + exec "${SHELL}" + fi } - +fi # Add exports if [[ $(uname) == "Darwin" ]]; then