<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,13 +1,59 @@
-. ~/.commonprofile
+source $HOME/.commonprofile
 
-# Get the aliases and functions
-if [ -f ~/.bashrc ]; then
-. ~/.bashrc
-fi
+# let's set a proper PATH
+#########################
 
-# User specific environment and startup programs
+# This is an attempt to use a fancy path generator
+# like the one in .zshenv
+new_path=&quot;&quot;
+expected_path=(
+  &quot;$HOME/bin/$MACHTYPE-$OSTYPE&quot;
+  &quot;$HOME/bin&quot;
+  /opt/local/bin
+  /opt/local/sbin
+  /opt/local/lib/postgresql83/bin
+  /opt/python-macosx/python-2.4/bin
+  /opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin
+  /sw/bin
+  /sw/sbin
+  /usr/local/bin
+  /usr/local/sbin
+  /usr/local/etc
+  /sbin
+  /etc
+  /bin
+  /usr/bin
+  /usr/sbin
+  /usr/ucb
+  /usr/bsd
+  /usr/libexec
+  /Developer/Tools
+  /usr/X11R6/bin
+  /usr/X11/bin
+  /usr/bin/X11
+  /usr/local/X11/bin
+  /usr/local/contrib/lib/kde/bin
+  /usr/local/tex/bin
+  /usr/local/lib/zsh/scr
+  /usr/local/games
+  /usr/games
+)
 
-# TODO use a fancy path generator like the one in .zshenv
-PATH=$PATH:$HOME/bin
+for element in &quot;${expected_path[@]}&quot;
+do
+  if [ -d $element ]; then
+    if [ -z $new_path ]; then
+      new_path=$element
+    else
+      new_path=$new_path:$element
+    fi
+  fi
+done
 
+PATH=$new_path
 export PATH
+
+# Get the aliases and functions
+if [ -f $HOME/.bashrc ]; then
+    source $HOME/.bashrc
+fi</diff>
      <filename>.bash_profile</filename>
    </modified>
    <modified>
      <diff>@@ -2,18 +2,40 @@
 
 # Source global definitions
 if [ -f /etc/bashrc ]; then
-        . /etc/bashrc
+    source /etc/bashrc
 fi
 
 ## User specific aliases and functions
 
 # set up common env vars between bourne shells
-. $HOME/.commonenv
+source $HOME/.commonenv
 
 # set up common aliases between bourne shells
-. $HOME/.commonrc
+source $HOME/.commonrc
 
-PS1='\n\d \A \w\n\h$ '
+# Set up the prompt
+
+ME=&quot;clayton&quot;
+# Only show user in the prompt if it isn't yourself
+# Make sure and set the $ME var
+if [[ $(whoami) = $ME ]]; then
+   PR_IMPOSTER=&quot;&quot;
+else
+   PR_IMPOSTER=&quot;(\u)&quot;
+fi
+
+# prompt will look like this:
+#
+# Tue Apr 28 00:38 | ~/Desktop
+# clyde$
+#
+# and like this if I'm not me :)
+#
+# (notme)
+# Tue Apr 28 00:38 | ~/Desktop
+# clyde$
+
+PS1=&quot;$PR_IMPOSTER\n\d \A | \w\n\h\$ &quot;
 
 # load up server specific extras
-. ~/.bash_extras
+source ~/.bash_extras</diff>
      <filename>.bashrc</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-UNAME=`uname`
+UNAME=$(uname)
 
 # set some defaults for LESS
 export LESS=&quot;-I-J-M&quot;
@@ -13,17 +13,22 @@ fi
 # set up some more OS X specific stuff
 if [[ $UNAME == &quot;Darwin&quot; ]]; then
     # make sure /usr/local makes it into the man path
-    # TODO could do the same kind of 'rationalize-path' as below...
+    # TODO could do the same kind of 'rationalize-path' as in .zshenv...
     export MANPATH=$MANPATH:/usr/local/man
-
-    # tidy settings
-    export HTML_TIDY=$HOME/.tidyconf
     
-    # TODO check for osx version?
+    # Figure out the major and minor version of OS X
+    os_majorversion=$(sw_vers | awk '/ProductVersion/ {print $2}' | cut -f2 -d'.')
+    os_minorversion=$(sw_vers | awk '/ProductVersion/ {print $2}' | cut -f3 -d'.')
+    
     # to not tar up resource forks, you'll need this
-    export COPYFILE_DISABLE=&quot;True&quot;
-    # Tiger version...
-    #export COPY_EXTENDED_ATTRIBUTES_DISABLE=&quot;True&quot;
+    if [  $os_majorversion -ge 5 ]; then
+        # Leopard version (and beyond??)
+        export COPYFILE_DISABLE=&quot;True&quot;
+    elif [ ${os_majorversion} -eq 4  -a  ${os_minorversion} -ge 6 ]; then
+        # Tiger version
+        export COPY_EXTENDED_ATTRIBUTES_DISABLE=&quot;True&quot;
+    fi
+
 fi
 
 # get crazy with python, and the cheese whiz</diff>
      <filename>.commonenv</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
-. $HOME/.commonfuncs
+source $HOME/.commonfuncs
 
 if checkPath fortune; then
-    if [ -d /opt/local/share/games/fortune/comedy -e -d /usr/share/games/fortune/comedy ]; then
-        FORTUNE=`fortune comedy`
+    if [ -d /opt/local/share/games/fortune/comedy ] || [ -d /usr/share/games/fortune/comedy ]; then
+        FORTUNE=$(fortune comedy)
     else
-        FORTUNE=`fortune`
+        FORTUNE=$(fortune)
     fi
     echo -e &quot;\n$FORTUNE\n&quot;
 fi</diff>
      <filename>.commonprofile</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
-UNAME=`uname`
+UNAME=$(uname)
 
-. $HOME/.commonfuncs
+source $HOME/.commonfuncs
 
 alias h=history
 alias what_linux=&quot;cat /etc/issue&quot;
@@ -18,10 +18,11 @@ if checkPath vim; then
 fi
 
 # set up a quickie for supervisorctl
+alias bsctl=bin/supervisorctl
 if checkPath supervisorctl; then
     alias sctl=supervisorctl
     # set up completions for supervisor
-    compctl -s '`supervisorctl status`' supervisorctl
+    compctl -s '$(supervisorctl status)' supervisorctl
 fi
 
 # some OS X specific stuff
@@ -95,7 +96,7 @@ export sfupublic='https://svn.sixfeetup.com/svn/public'
 
 # zope shortcuts based on our old zeo/zss setup
 # this was before buildout :)
-alias zRunzope='zss/bin/zeoctl start;zeo/bin/runzope'
+alias zRunzope='zss/bin/zeoctl start;zeo/bin/zopectl fg'
 alias zStart='zss/bin/zeoctl start;zeo/bin/zopectl start'
 alias zStop='zeo/bin/zopectl stop;zss/bin/zeoctl stop'
 alias zCtl='zeo/bin/zopectl'
@@ -108,7 +109,9 @@ alias zu='sudo -H -u zope'
 alias bfg='bin/control fg'
 alias bs='bin/control stop'
 alias bbn='bin/buildout -v'
-alias bbpin=&quot;bin/buildout -Nvvvvv install instance | sed -ne 's/^Picked: //p' | sort | uniq&quot;
+alias bbk='bbn -U'
+alias bbkd='bbk -c development.cfg'
+alias bbpin=&quot;bin/buildout -Nvvvvv plonesite:enabled=false | sed -ne 's/^Picked: //p' | sort | uniq&quot;
 alias bbc=&quot;rm -rf .installed parts/* develop-eggs/*&quot;
 alias bbcwipe=&quot;bbc var/filestorage/Data.fs*&quot;
 alias bbrefresh=&quot;bs; rm .installed.cfg var/filestorage/Data.fs*; bbn -N&quot;
@@ -150,6 +153,8 @@ alias targzc='tar --exclude=&quot;.DS_Store&quot; --exclude=&quot;*pyc&quot; -zcvf'
 alias tarbzc='tar --exclude=&quot;.DS_Store&quot; --exclude=&quot;*pyc&quot; -jcvf'
 alias targzx='tar -zxvf'
 alias tarbzx='tar -xvjf'
+# 7zip
+alias 7zultra='7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on'
 
 # always show all versions of an executable
 alias which=&quot;which -a&quot;</diff>
      <filename>.commonrc</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-. $HOME/.commonprofile
+source $HOME/.commonprofile</diff>
      <filename>.zprofile</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-. $HOME/.commonenv
+source $HOME/.commonenv
 
 ###################################
 #     Here we set the PATH:       #
@@ -39,6 +39,8 @@ path=(
   &quot;$HOME/bin&quot;
   /opt/local/bin
   /opt/local/sbin
+  /opt/local/lib/postgresql83/bin
+  /opt/python-macosx/python-2.4/bin
   /opt/local/Library/Frameworks/Python.framework/Versions/2.4/bin
   /sw/bin
   /sw/sbin
@@ -64,9 +66,11 @@ path=(
   /usr/local/games
   /usr/games
   &quot;$path[@]&quot;
-  &quot;$fpath[@]&quot;
 )
 
+# add the following to the above array to get functions as well:
+# &quot;$fpath[@]&quot;
+
 export PATH
 # Only unique entries please.
 typeset -U path
@@ -75,4 +79,4 @@ typeset -U path
 rationalize-path path
 
 # extra per environment settings
-. $HOME/.zshenv_extras
+source $HOME/.zshenv_extras</diff>
      <filename>.zshenv</filename>
    </modified>
    <modified>
      <diff>@@ -77,7 +77,7 @@ setprompt () {
     fi
     
     # Finally, the prompt (removed the color - claytron)
-    PROMPT='
+    PROMPT='$PR_IMPOSTER
 $PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
 $PR_SHIFT_IN$PR_ULCORNER$PR_HBAR$PR_SHIFT_OUT\
 %D{%a,%b %d}\
@@ -86,7 +86,7 @@ $PR_SHIFT_IN$PR_HBAR$PR_HBAR${(e)PR_FILLBAR}$PR_HBAR$PR_SHIFT_OUT\
 $PR_SHIFT_IN$PR_HBAR$PR_URCORNER$PR_SHIFT_OUT\
 
 $PR_SHIFT_IN$PR_LLCORNER$PR_HBAR$PR_SHIFT_OUT\
-%m$PR_IMPOSTER%#\
+%m%#\
 $PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT '
 
     RPROMPT=' $PR_SHIFT_IN$PR_HBAR$PR_HBAR$PR_SHIFT_OUT\</diff>
      <filename>.zshprompt</filename>
    </modified>
    <modified>
      <diff>@@ -14,9 +14,9 @@ setprompt () {
     
     # simple version of my ZSH prompt
     RPROMPT=''
-    PROMPT='
+    PROMPT='$PR_IMPOSTER
 %D{%a %h %e, %H:%M} | %/
-%m$PR_IMPOSTER%# '
+%m%# '
     PS2=''
 }
 </diff>
      <filename>.zshprompt_simple</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 UNAME=`uname`
 
-. $HOME/.commonfuncs
+source $HOME/.commonfuncs
 
 # Log dir hash
 hash -d L=/var/log
@@ -8,6 +8,20 @@ hash -d RA=/var/db/rails
 hash -d R=/usr/local/etc/rc.d
 hash -d Z=/var/db/zope
 
+# python site-packages automagic hashes (I tried briefly to make this purdy)
+if checkPath python2.3; then
+    hash -d P23=`python2.3 -c &quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;`
+fi
+if checkPath python2.4; then
+    hash -d P24=`python2.4 -c &quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;`
+fi
+if checkPath python2.5; then
+    hash -d P25=`python2.5 -c &quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;`
+fi
+if checkPath python2.5; then
+    hash -d P26=`python2.6 -c &quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;`
+fi
+
 # OS X specific settings
 if [[ $UNAME == &quot;Darwin&quot; ]]; then
     
@@ -19,16 +33,20 @@ if [[ $UNAME == &quot;Darwin&quot; ]]; then
     hash -d OP=$HOME/Documents/sixfeetup/projects
     hash -d EP=/Volumes/MUZAK/zope
     hash -d P=$HOME/sixfeetup/projects
-    hash -d P24=/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/
     hash -d S=$HOME/Sites
 
 fi
 
 # set up common aliases between shells
-. $HOME/.commonrc
+source $HOME/.commonrc
 
 alias qs='~/.dotfiles/create_links.sh;source $HOME/.dotfiles/.zshrc'
 
+# global aliases #
+# disable the plonesite part in a buildout run
+alias -g psef=&quot;plonesite:enabled=false&quot;
+alias -g py_site_packages='-c &quot;from distutils.sysconfig import get_python_lib; print get_python_lib()&quot;'
+
 # cvs setup
 export CVSROOT=:pserver:clayton@cvs:/var/cvsroot
 
@@ -53,8 +71,8 @@ bindkey -M viins '\e[3~' vi-delete-char
 bindkey -M viins '^B' push-line-or-edit
 
 # set up history
-HISTSIZE=1000
-SAVEHIST=1000
+HISTSIZE=3000
+SAVEHIST=3000
 HISTFILE=~/.zsh_history
 export HISTFILE HISTSIZE SAVEHIST
 
@@ -72,7 +90,7 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:
 # use some crazy ass shell prompt
 # thanks to for the basis: http://aperiodic.net/phil/prompt/
 ME=&quot;clayton&quot;
-. ~/.zshprompt
+source ~/.zshprompt
 
 # load up per environment extras
-. ~/.zshextras
+source ~/.zshextras</diff>
      <filename>.zshrc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4f0183e10500431ab1ecae7fb36cd18e11d9da51</id>
    </parent>
  </parents>
  <author>
    <name>clayton</name>
    <email>clayton@7abc7aa1-7e52-db11-9331-00508bd72530</email>
  </author>
  <url>http://github.com/claytron/dotfiles/commit/18d365333b7f19e6f12380abf9f1f79ac36c4e00</url>
  <id>18d365333b7f19e6f12380abf9f1f79ac36c4e00</id>
  <committed-date>2009-04-27T22:40:44-07:00</committed-date>
  <authored-date>2009-04-27T22:40:44-07:00</authored-date>
  <message>I made a crapload of changes:

 * created a PATH in the .bash_profile similar to that of the .zshenv
 * added global alias for plonesite:enabled=false
 * bumped zsh history file size to 3000
 * added directory hashes for each python site-packges dir
 * use zopectl fg in zRunzope instead of runzope
 * changed bbpin to turn off plonesite part
 * added aliases
   * bsctl for supervisorctl in a buildout
   * bbk for karl work that ignores user defailts
   * bbkd for added development fun in karl
   * 7zultra for hard core 7zip action
 * added python-macosx bin dir to path
 * added postgresql83 bin dir to path
 * remove $fpath from zshenv path setup
 * fix up .commonprofile so that it works properly in bash
 * put imposter var on top line in zsh prompts
 * make bash prompt the same as zsh simple prompt
 * set the imposter var for bash prompt
 * use COPY_EXTENDED_ATTRIBUTES_DISABLE if on Tiger or COPYFILE_DISABLE if on Leopard and beyond
 * removed HTML_TIDY env var
 * use $() instead of `` everywhere
 * use source instead of . everywhere

git-svn-id: https://svn.sixfeetup.com/svn/private/claytron/dotfiles/trunk@13465 7abc7aa1-7e52-db11-9331-00508bd72530</message>
  <tree>df8baa811ce5b97303ad073bc9b345d0ea17e30a</tree>
  <committer>
    <name>clayton</name>
    <email>clayton@7abc7aa1-7e52-db11-9331-00508bd72530</email>
  </committer>
</commit>
