Skip to content

Commit

Permalink
Check current shell options instead file descriptor to detect interac…
Browse files Browse the repository at this point in the history
…tive mode
  • Loading branch information
G00fY2 authored and Thomas Wirth committed Feb 10, 2022
1 parent 708bd95 commit bb8bdc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoupdate.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi

if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
if [[ $- == *i* ]] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
BLUE="$(tput setaf 4)"
NORMAL="$(tput sgr0)"
Expand Down

0 comments on commit bb8bdc8

Please sign in to comment.