summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-02-09 20:43:48 +0100
committerMarc Cornellà <marc.cornella@live.com>2015-02-10 19:22:50 +0100
commit2193135ebc4ce0778ff6949b448e4526dbd34284 (patch)
treecf18f5f63bda799616e03e59e48a7fa1ffe2a19a /themes
parent51946eb3ce8021aebe940f879225828d89c12317 (diff)
downloadzsh-2193135ebc4ce0778ff6949b448e4526dbd34284.tar.gz
zsh-2193135ebc4ce0778ff6949b448e4526dbd34284.tar.bz2
zsh-2193135ebc4ce0778ff6949b448e4526dbd34284.zip
Clean up appearance lib file and redundant `colors` calls in other files
Diffstat (limited to 'themes')
-rw-r--r--themes/adben.zsh-theme15
-rw-r--r--themes/apple.zsh-theme1
-rw-r--r--themes/gnzh.zsh-theme3
-rw-r--r--themes/half-life.zsh-theme2
-rw-r--r--themes/jonathan.zsh-theme5
-rw-r--r--themes/kolo.zsh-theme2
-rw-r--r--themes/mikeh.zsh-theme2
-rw-r--r--themes/simonoff.zsh-theme5
-rw-r--r--themes/steeef.zsh-theme2
-rw-r--r--themes/zhann.zsh-theme2
10 files changed, 9 insertions, 30 deletions
diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
index 6869c8a20..212b823a5 100644
--- a/themes/adben.zsh-theme
+++ b/themes/adben.zsh-theme
@@ -69,17 +69,17 @@ function precmd {
#Choose from all databases, regardless of whether they are considered "offensive"
fortune -a
}
- #obtains the tip
+ #obtains the tip
ps1_command_tip () {
wget -qO - http://www.commandlinefu.com/commands/random/plaintext | sed 1d | sed '/^$/d'
- }
+ }
prompt_header () {
if [[ "true" == "$ENABLE_COMMAND_TIP" ]]; then
ps1_command_tip
else
ps1_fortune
- fi
- }
+ fi
+ }
PROMPT_HEAD="${RED_START}${PR_YELLOW}$(prompt_header)${PR_RESET}"
# set a simple variable to show when in screen
if [[ -n "${WINDOW}" ]]; then
@@ -99,11 +99,8 @@ prompt_context () {
set_prompt () {
# required for the prompt
setopt prompt_subst
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -gt 8 ]]; then
- colors
- fi
-
+ autoload zsh/terminfo
+
# ######### PROMPT #########
PROMPT='${PROMPT_HEAD}
${RED_START}$(prompt_context)
diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme
index 275341dc6..95e6249fa 100644
--- a/themes/apple.zsh-theme
+++ b/themes/apple.zsh-theme
@@ -7,7 +7,6 @@ get_git_dirty() {
}
autoload -Uz vcs_info
-autoload -U colors && colors
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
index 0519fbefb..ab154c1e5 100644
--- a/themes/gnzh.zsh-theme
+++ b/themes/gnzh.zsh-theme
@@ -2,8 +2,7 @@
# Based on bira theme
# load some modules
-autoload -U colors zsh/terminfo # Used in the colour alias below
-colors
+autoload -U zsh/terminfo # Used in the colour alias below
setopt prompt_subst
# make some aliases for the colours: (could use normal escape sequences too)
diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme
index 942affa94..a3c505706 100644
--- a/themes/half-life.zsh-theme
+++ b/themes/half-life.zsh-theme
@@ -13,8 +13,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
index bca92970c..2f0e77431 100644
--- a/themes/jonathan.zsh-theme
+++ b/themes/jonathan.zsh-theme
@@ -44,10 +44,7 @@ setprompt () {
###
# See if we can use colors.
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
- fi
+ autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
diff --git a/themes/kolo.zsh-theme b/themes/kolo.zsh-theme
index e743289c3..51b0af724 100644
--- a/themes/kolo.zsh-theme
+++ b/themes/kolo.zsh-theme
@@ -1,5 +1,3 @@
-autoload -U colors && colors
-
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme
index 943f04d38..a95383ba5 100644
--- a/themes/mikeh.zsh-theme
+++ b/themes/mikeh.zsh-theme
@@ -1,6 +1,4 @@
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
diff --git a/themes/simonoff.zsh-theme b/themes/simonoff.zsh-theme
index fb4d32e24..63ce4261b 100644
--- a/themes/simonoff.zsh-theme
+++ b/themes/simonoff.zsh-theme
@@ -63,10 +63,7 @@ setprompt () {
###
# See if we can use colors.
- autoload colors zsh/terminfo
- if [[ "$terminfo[colors]" -ge 8 ]]; then
- colors
- fi
+ autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
index e38188d35..13728ca9a 100644
--- a/themes/steeef.zsh-theme
+++ b/themes/steeef.zsh-theme
@@ -15,8 +15,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
-autoload colors
-colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
diff --git a/themes/zhann.zsh-theme b/themes/zhann.zsh-theme
index 5c0854730..27597ec6c 100644
--- a/themes/zhann.zsh-theme
+++ b/themes/zhann.zsh-theme
@@ -1,5 +1,3 @@
-autoload -U colors && colors
-
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'