chore(zsh): only capture SIGUSR1 if not a tty

This commit is contained in:
Afonso Franco 2024-10-05 13:09:33 +01:00
parent 3ea71dc91d
commit b3386d4f46
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4

View file

@ -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