[zsh] only capture SIGUSR1 if not a tty

This commit is contained in:
Afonso Franco 2024-10-05 13:09:33 +01:00
parent e9d6a16b41
commit 2e8cefb22a
Signed by: afonso
SSH key fingerprint: SHA256:PQTRDHPH3yALEGtHXnXBp3Orfcn21pK20t0tS1kHg54

View file

@ -1,10 +1,11 @@
#This is used to reload the instance
TRAPUSR1() {
if [[ ! $(tty) =~ ^/dev/tty[0-9]*$ ]]; then
TRAPUSR1() {
if [[ -o INTERACTIVE ]]; then
exec "${SHELL}"
fi
}
fi
# Add exports
if [[ $(uname) == "Darwin" ]]; then