These are for bash shells, and may be Mac-specific also, and would go in .bash_profile or .bash_login or as marked specifically below:
1. Always open new terminal windows in the location of the last directory that you cd'd to (source:

):
pathed_cd () {
if [ "$1" == "" ]; then
cd
else
cd "$1"
fi
pwd > ~/.cdpath
}
alias cd="pathed_cd"
if [ -f ~/.cdpath ]; then
cd $(cat ~/.cdpath)
fi
2. Erase duplicate entries from command history (source:

):
export HISTCONTROL=erasedups
shopt -s histappend
3. Allow partial matching of previous history instead of scrolling back through full history (note this one goes in .inputrc, source:

):
- do not make noise
set bell-style none
- By default up/down are bound to previous-history
- and next-history respectively. The following does the
- same but gives the extra functionality where if you
- type any text (or more accurately, if there is any text
- between the start of the line and the cursor),
- the subset of the history starting with that text
- is searched (like 4dos for e.g.).
- Note to get rid of a line just Ctrl-C
"e[B": history-search-forward
"e[A": history-search-backward
$if Bash
# F10 toggles mc on and off
# Note Ctrl-o toggles panes on and off in mc
"e[21~": "mcC-M"
#do history expansion when space entered
Space: magic-space
$endif
- Include system wide settings which are ignored
- by default if one has their own .inputrc
$include /etc/inputrc
4. Add status indicator for local changes to git or svn versioned directories (source:

):
- Prompt setup, with SCM status
parse_git_branch() {
local DIRTY STATUS
STATUS=$(git status 2>/dev/null)
[ $? -eq 1 ] || return
[[ "$STATUS" == *'working directory clean'* ]] || DIRTY=' *'
echo "($(git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* //')$DIRTY)"
}
parse_svn_revision() {
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //')
[ "$REV" ] || return
[ "$(svn st)" ] && DIRTY=' *'
echo "(r$REV$DIRTY)"
}
PS1='u@h:W$(parse_git_branch)$(parse_svn_revision) $ '
5. Misc aliases.
- various ls aliases
alias ll="ls -lp"
alias la="ls -ap"
alias lla="ls -lap"
- shorthand to search history, "h blah"
alias h="history | grep "
- open current directory in finder
alias o='open .'
- add all new files, which aren't ignored, to svn repo
alias san='svn status | grep "^?" | awk "{print $2}" | xargs svn add'
I am THE MUTANT human walking talking herbicide. No plant goes past my threshold without being DEAD. Hahaha... I have murdered 16 potted plants thus far.
I need to format and reinstall a fresh copy of everything soon...
Ack. Sorry to hear it!
Sorry to hear of your misfortune, (e:jim) ... but in a twisted way, I'm relieved to know that I'm not the only one having an inefficient workday this Monday.
fwiw I also have herbicidal tendencies.