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/21585/root/usr/share/zsh/4.2.6/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/share/zsh/4.2.6/functions/prompt_oliver_setup
# oliver prompt theme

prompt_oliver_help() {
  cat <<'ENDHELP'
With this prompt theme, the prompt contains the current directory,
history number, number of jobs (if non-zero) and the previous
command's exit code (if non-zero) and a final character which
depends on priviledges.

The colour of the prompt depends on two associative arrays -
$pcolour and $tcolour. Each array is indexed by the name of the
local host. Alternatively, the colour can be set with parameters
to prompt. To specify colours, use English words like 'yellow',
optionally preceded by 'bold'.

The hostname and username are also included unless they are in the
$normal_hosts or $normal_users array.
ENDHELP
}

prompt_oliver_setup() {
  prompt_opts=( cr subst percent )

  [[ "${(t)pcolour}" != assoc* ]] && typeset -Ag pcolour
  [[ "${(t)tcolour}" != assoc* ]] && typeset -Ag tcolour
  local pcol=${1:-${pcolour[${HOST:=`hostname`}]:-yellow}}
  local pcolr=$fg[${pcol#bold}]
  [[ $pcol = bold* ]] && pcolr=$bold_color$pcolr
  
  local tcol=${2:-${tcolour[$HOST]:-white}}
  local tcolr=$reset_color$fg[${tcol#bold}]
  [[ $tcol = bold* ]] && tcolr=$tcolr$bold_color
  
  local a host="%m:" user="%n "
  [[ $HOST == (${(j(|))~normal_hosts}) ]] && host=""
  [[ ${USER:-`whoami`} == (root|${(j(|))~normal_users}) ]] && user=""

  PS1="%{$pcolr%}$user$host%~%"'$((COLUMNS-12))'"(l.$prompt_newline. )[%h%1(j.%%%j.)%0(?..:%?)]%# %{$tcolr%}"
  RPS2='<%^'
  PS2=''
}

prompt_oliver_setup "$@"

Anon7 - 2021