File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -101,17 +101,16 @@ setopt PROMPT_SUBST NO_PROMPT_BANG
101101# ##########################################################
102102_agkozak_has_colors () {
103103 if (( $+ AGKOZAK_HAS_COLORS )) ; then
104- (( AGKOZAK_HAS_COLORS ))
104+ :
105105 else
106106 local colors
107- if [[ $OSTYPE == (* bsd* | dragonfly* ) ]]; then
108- colors=$( tput Co)
109- else
110- colors=$( tput colors)
111- fi
112- typeset -g AGKOZAK_HAS_COLORS=$(( colors >= 8 ? 1 : 0 ))
113- (( AGKOZAK_HAS_COLORS ))
107+ case $OSTYPE in
108+ * bsd* |dragonfly* ) colors=$( tput Co) ;;
109+ * ) colors=$( tput colors) ;;
110+ esac
111+ typeset -g AGKOZAK_HAS_COLORS=$(( colors >= 8 ))
114112 fi
113+ (( AGKOZAK_HAS_COLORS ))
115114}
116115
117116# ###########################################################
You can’t perform that action at this time.
0 commit comments