From 6cc6a51cb784ce4b330d8fe022cc435d898c82ff Mon Sep 17 00:00:00 2001 From: michener Date: Tue, 30 Sep 2008 23:32:16 +0000 Subject: [PATCH] zsh updates git-svn-id: http://photonzero.com/dotfiles/trunk@25 23f722f6-122a-0410-8cef-c75bd312dd78 --- .zsh_profile | 32 ++++++++++++++++++++++++++++++++ .zshrc | 14 ++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .zsh_profile diff --git a/.zsh_profile b/.zsh_profile new file mode 100644 index 0000000..76b8e48 --- /dev/null +++ b/.zsh_profile @@ -0,0 +1,32 @@ +# $FreeBSD: src/share/skel/dot.profile,v 1.19.2.2 2002/07/13 16:29:10 mp Exp $ +# +# .profile - Bourne Shell startup script for login shells +# +# see also sh(1), environ(7). +# + +# remove /usr/games and /usr/X11R6/bin if you want +PATH=/$HOME/bin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/games:/usr/X11R6/bin; export PATH +case `uname` in +SunOS) + UCB_PATH=/usr/sww/lang/acl:/usr/sww/lang/jdk-1.5.0/bin:/usr/openwin/bin:/usr/dt/bin:/usr/sww/opt/java/bin:/usr/sww/bin:/share/b/grading/bin:/share/b/grading/sbin:/share/b/runas/sun4u:/share/b/bin:/home/aa/projects/scheme/bin:/usr/ucb:/usr/ccs/bin:/usr/sfw/bin; export UCB_PATH + PATH=$PATH:$UCB_PATH; export PATH + ;; +Darwin) + MACPORTS_PATH=/opt/local/bin:/opt/local/sbin:/opt/local/usr/bin:/opt/local/usr/local/bin; export MACPORTS_PATH + PATH=$HOME/bin:$MACPORTS_PATH:$PATH; export PATH + export DISPLAY=:0.0 + set completion-ignore-case on + ;; +esac + +# Setting TERM is normally done through /etc/ttys. Do only override +# if you're sure that you'll never log in via telnet or xterm or a +# serial line. +# Use cons25l1 for iso-* fonts +# TERM=cons25; export TERM + +BLOCKSIZE=K; export BLOCKSIZE +EDITOR=vim; export EDITOR +PAGER=less; export PAGER + diff --git a/.zshrc b/.zshrc index fff82cb..1b61244 100644 --- a/.zshrc +++ b/.zshrc @@ -31,8 +31,22 @@ ZLS_COLORS=$LS_COLORS 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