diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-02-09 20:43:48 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-02-10 19:22:50 +0100 |
commit | 2193135ebc4ce0778ff6949b448e4526dbd34284 (patch) | |
tree | cf18f5f63bda799616e03e59e48a7fa1ffe2a19a /themes/adben.zsh-theme | |
parent | 51946eb3ce8021aebe940f879225828d89c12317 (diff) | |
download | zsh-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/adben.zsh-theme')
-rw-r--r-- | themes/adben.zsh-theme | 15 |
1 files changed, 6 insertions, 9 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) |