diff options
author | Robby Russell <robby@planetargon.com> | 2015-02-10 11:17:17 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2015-02-10 11:17:17 -0800 |
commit | ff823f810b38cd761ac3f65162065ad613b6e25d (patch) | |
tree | cf18f5f63bda799616e03e59e48a7fa1ffe2a19a /themes/adben.zsh-theme | |
parent | 13e5afe805f28749f4aa6a5e82272760a62ad573 (diff) | |
parent | 2193135ebc4ce0778ff6949b448e4526dbd34284 (diff) | |
download | zsh-ff823f810b38cd761ac3f65162065ad613b6e25d.tar.gz zsh-ff823f810b38cd761ac3f65162065ad613b6e25d.tar.bz2 zsh-ff823f810b38cd761ac3f65162065ad613b6e25d.zip |
Merge pull request #3564 from mcornella/LFDM-cleaning_lib
Repost #2422: cleaning lib
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) |