aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-09-13 01:15:43 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-09-13 01:18:02 +0300
commit08c3649c6a1a4f575fc0829654c217a4eec98b8b (patch)
tree47d1ba703a7d39b15548244642ad671c7c377077 /powerlevel9k.zsh-theme
parentdfe4c109bdb4a6895dc7d58383c22bbe6313b074 (diff)
Obey shellcheck.net: Quote the rhs of != in [[ ]] to prevent glob matching
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 76c3c3c0..16df093d 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -372,7 +372,7 @@ left_prompt_segment() {
local bg fg
[[ -n $2 ]] && bg="%K{$2}" || bg="%k"
[[ -n $3 ]] && fg="%F{$3}" || fg="%f"
- if [[ $CURRENT_BG != 'NONE' && $2 != $CURRENT_BG ]]; then
+ if [[ $CURRENT_BG != 'NONE' ]] && [[ "$2" != "$CURRENT_BG" ]]; then
# Middle segment
echo -n "%{$bg%F{$CURRENT_BG}%}$(print_icon 'LEFT_SEGMENT_SEPARATOR')%{$fg%} "
else
@@ -474,7 +474,7 @@ function +vi-git-remotebranch() {
# Always show the remote
#if [[ -n ${remote} ]] ; then
# Only show the remote if it differs from the local
- if [[ -n ${remote} && ${remote#*/} != ${branch_name} ]] ; then
+ if [[ -n ${remote} ]] && [[ "${remote#*/}" != "${branch_name}" ]] ; then
hook_com[branch]+="%F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_REMOTE_BRANCH_ICON')%f%F{$POWERLEVEL9K_VCS_FOREGROUND}${remote// /}%f"
fi
}