Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agkozak committed Aug 1, 2018
1 parent 851ad97 commit 12b99c1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions agkozak-zsh-prompt.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@ if (( AGKOZAK_PROMPT_DEBUG )); then
fi
fi

###########################################################
# Are colors available?
#
# Globals:
# AGKOZAK_HAS_COLORS
###########################################################
_agkozak_has_colors() {
typeset -g AGKOZAK_HAS_COLORS=${AGKOZAK_HAS_COLORS:-$(( $(tput colors) >= 8 ? 1 : 0 ))}
(( AGKOZAK_HAS_COLORS ))
}

# Set AGKOZAK_MULTILINE to 0 to enable the legacy, single-line prompt
typeset -g AGKOZAK_MULTILINE=${AGKOZAK_MULTILINE:-1}

Expand All @@ -91,6 +80,17 @@ setopt PROMPT_SUBST NO_PROMPT_BANG
# BASIC FUNCTIONS
############################################################

###########################################################
# Are colors available?
#
# Globals:
# AGKOZAK_HAS_COLORS
###########################################################
_agkozak_has_colors() {
typeset -g AGKOZAK_HAS_COLORS=${AGKOZAK_HAS_COLORS:-$(( $(tput colors) >= 8 ? 1 : 0 ))}
(( AGKOZAK_HAS_COLORS ))
}

############################################################
# Is the user connected via SSH?
#
Expand Down Expand Up @@ -176,7 +176,7 @@ _agkozak_branch_changes() {
esac
done

[[ -n $symbols ]] && printf ' %s' "${symbols//asterisk/*}"
[[ -n $symbols ]] && printf ' %s' "${symbols}"
}

############################################################
Expand Down

0 comments on commit 12b99c1

Please sign in to comment.