Check for presence of TTY environment variable on zsh

The instant-prompt feature of Powerlevel redirects stdin during zshrc causing grc not to load. This checks for the TTY environment variable in the event a tty isn't found.
This commit is contained in:
Danny Thomas 2021-12-08 11:06:49 +11:00
parent f4a579e08d
commit be7f5c1573
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env zsh
if ! tty -s || [ ! -n "$TERM" ] || [ "$TERM" = dumb ] || (( ! $+commands[grc] ))
if (! tty -s && [ -z "$TTY" ]) || [ ! -n "$TERM" ] || [ "$TERM" = dumb ] || (( ! $+commands[grc] ))
then
return
fi