1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

Clean up appearance lib file and redundant colors calls in other files

This commit is contained in:
Marc Cornellà
2015-02-09 20:43:48 +01:00
parent 51946eb3ce
commit 2193135ebc
13 changed files with 12 additions and 39 deletions

View File

@@ -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)