dotfiles/.zshrc
michener a0995d6be5 Merge
git-svn-id: http://photonzero.com/dotfiles/trunk@32 23f722f6-122a-0410-8cef-c75bd312dd78
2009-09-09 07:03:29 +00:00

52 lines
1.2 KiB
Bash

#complist
autoload -U compinit
compinit
setopt extended_glob
bindkey -e
ZLS_COLORS=$LS_COLORS
setopt prompt_subst
###
# See if we can use colors.
autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
colors
fi
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_LIGHT_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_$color='%{$fg[${(L)color}]%}'
(( count = $count + 1 ))
done
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
###
# Decide whether to set a screen title
# if [[ "$TERM" == "screen" ]]; then
# PR_STITLE=$'%{\ekzsh\e\\%}'
# else
# PR_STITLE=''
# fi
# preexec () {
# local CMD="${1/#sudo /#}"
# local CMD="${CMD/#nano /}"
# local CMD="${CMD/#ssh />}"
# $SCREENME true || echo -ne "\ek${CMD%% *}\e\\"
# }
#precmd () {
#$SCREENME true || echo -ne "\ekzsh\e\\"
#}
PROMPT='$PR_STITLE$PR_LIGHT_BLUE($PR_LIGHT_YELLOW%D{%H:%M}|%!$PR_BLUE%)[%(!.$PR_RED.$PR_GREEN)%n@%m$PR_LIGHT_CYAN %~$PR_BLUE]$PR_NO_COLOUR%(!.#.$) '
#source .zshprompt
source ~/.zsh_profile
source ~/.bash_aliases
source ~/.zshenv
if [ -n "`which fortune`" ]; then
fortune
fi