All pastes #178924 Raw Edit

Someone

public text v1 · immutable
#178924 ·published 2006-09-21 18:54 UTC
rendered paste body
###############################################################################
# local variables to use
ZH=~/.zsh

###############################################################################
# some environment variables to set up
export HOSTNAME="`hostname`"
export LESS="-MM"
export ARCH=`uname -m`"."`uname -s`

###############################################################################


###############################################################################
# term type - if we dont know the term type - set it to linux
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
  export TERM=linux
fi

###############################################################################
# my prompt
# normal prompt
# export PS1=$C1$G1$C2' %m '$C3$G2$C4$G1$C5' %t '$C0''$C6'%~'$C0' '
 
 black='%{%}'
 red='%{%}'
 green='%{%}'
 yellow='%{%}'
 blue='%{%}'
 purple='%{%}'
 cyan='%{%}'
 grey='%{%}'
 bg_black='%{%}'
 bg_red='%{%}'
 bg_green='%{%}'
 bg_yellow='%{%}'
 bg_blue='%{%}'
 bg_purple='%{%}'
 bg_cyan='%{%}'
 bg_grey='%{%}'
 bright='%{%}'
 underline='%{%}'
 flashing='%{%}'
 normal='%{%}'
 
export PROMPT=$bright$bg_red'[ '$red'%t '$yellow'%~'$normal$bg_red$bright' ]'$normal' '
# prompt you get when you dont finish typing stuff...
#export PS1='[- %t %~ -]'
export PS2=$bright$green'[ ??? ] ->'$normal

###############################################################################
# function called before the prompt is displayed
function precmd {
# get a title at random from the title list
  if [ $TERM = xterm ]; then
    TLINES=`wc -l $ZH/titles | awk '{print $1;}'`
    TLINE=$[ ${RANDOM} % $TLINES ];
    TLINE=$[ $TLINE + 1 ];
    TITLE=`head -$TLINE < $ZH/titles | tail -1`
    echo -ne ']0;'$TITLE'\007'
  fi
}

###############################################################################
# misc settings
# num of times ctrl-d has to be pressed again to get zsh to exit
export IGNOREEOF=0
# set the default editor fc
export FCEDIT=jed
# define which file sets up the interactive input settings
export INPUTRC=$ZH/input
# set this variable to something so "dot" files in a pathname are expanded
export glob_dot_filenames=1
# make sure zsh doesn't follow links in expansions
export nolinks=1
# history
export HISTSIZE=1024
export HISTFILESIZE=1024
# hostname completion
export HOSTFILE="/etc/hosts"
# set the umask
umask 022
# setup the dir colours
eval `dircolors -b $ZH/ls_colors`
# get my aliases
. $ZH/aliases
# My preferred editor
export EDITOR=jed
# Jed settings
#if [ ! -f ~/.nojed ]; then
#  export JED_LIBRARY=~/.jed,/usr/lib/jed/lib
#  export JED_HOME=~/.jed
#fi
# just type directory name to cd to it
setopt AUTO_CD
# list all choices on an ambiguous completion
setopt AUTO_LIST
# after second completion attempt use a menu
setopt AUTO_MENU
# complete dirs with a / at the end
setopt AUTO_PARAM_SLASH
# dont run background jobs at a lower priority
setopt NO_BG_NICE
# if we cd to a dir that doesnt exist and its not starting with / try it in ~/
setopt CDABLE_VARS
# dont send HUP signales to jobs running if shell goes down
setopt NO_HUP
# notify me of bg jobs exiting immediately - not at next prompt
setopt NOTIFY

###############################################################################


###############################################################################