KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21571/root/usr/share/zsh/4.2.6/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/root/usr/share/zsh/4.2.6/functions/prompt_fade_setup
# Generic colour fade-bar prompt theme from bashprompt
# Created by Jim Foltz <aa204@acorn.net>
# Changed by Spidey 08/06
# Converted to zsh prompt theme by <adam@spiers.net>

prompt_fade_help () {
  cat <<EOH
This prompt is color-scheme-able.  You can invoke it thus:

  prompt fade [<fade-bar-and-cwd> [<userhost> [<date>]]] 

where the parameters are the colors for the fade-bar and current
working directory, user@host text, and date text respectively.  The
default colors are green, white, and white.  This theme works best
with a dark background.

Recommended fonts for this theme: nexus or vga or similar.  If you
don't have any of these, the 8-bit characters will probably look
stupid.
EOH
}

# emacs shell-script mode gets confused with ' in heredoc above

prompt_fade_setup () {
  local fadebar_cwd=${1:-'green'}
  local userhost=${2:-'white'}
  local date=${3:-'white'}

  for code in 333 262 261 260 333 262 261 260 333 262 261 260; do
    local varname=char_$code
    : ${(P)varname=$(echo -n "\\0$code")}
  done

  PS1="%{$fg[$fadebar_cwd]$bg[$fadebar_cwd]$bold_color%}$char_333$char_262$char_261$char_260%{$fg[$userhost]$bg[$fadebar_cwd]$bold_color%}%n@%m%{$reset_color$fg[$fadebar_cwd]$bg[grey]%}$char_333$char_262$char_261$char_260%{$fg[$date]$bg[grey]$bold_color%} %D{%a %b %d} %D{%I:%M:%S%P} $prompt_newline%{$fg[$fadebar_cwd]$bg[grey]$bold_color%}%~/%{$reset_color%} "
  PS2="%{$fg[$fadebar_cwd]$bg[grey]%}$char_333$char_262$char_261$char_260%{$reset_color%}>"

  precmd () { setopt promptsubst }
  preexec () { }
}

prompt_fade_preview () {
  local color colors
  colors=(red yellow green blue magenta)

  if (( ! $#* )); then
    for (( i = 1; i <= $#colors; i++ )); do
      color=$colors[$i]
      prompt_preview_theme fade $color
      print
    done
    prompt_preview_theme fade white grey blue
  else
    prompt_preview_theme fade "$@"
  fi
}

prompt_fade_setup "$@"

Anon7 - 2021