-# --- Set the CDPATH ---
-#
-# CDPATH=~/src:/usr/src:/usr/lib:/usr/share
-# dots=..
-# i=6
-# while (( i > 0 )); do
-# CDPATH=$CDPATH:$dots
-# dots=$dots/..
-# (( i -= 1 ))
-# done
-# CDPATH=$CDPATH:/
-
-# --- Some colour `ls' support ---
-
-[ "${TMPDIR+yes}" ] || eval `tmpdir -b`
-if [ -x /usr/bin/dircolors -o -x /usr/local/bin/dircolors ]; then
- eval `dircolors -b ~/.dircolors`
-else
- unset LS_COLORS
-fi
-
-ls () {
- if [ -t 1 ]; then
- command ls $LS_OPTIONS ${LS_COLORS+--color=auto} "$@"
- else
- command ls "$@"
- fi
-}
-
-# --- Some colour `grep' support ---
-
-export GREP_COLORS="mt=01;31:ms=01;31:mc=031;31:fn=36:ln=36:bn=36:se=34"
-
-greplike () {
- declare grep=$1; shift
- if [ -t 1 ]; then
- command $grep ${GREP_COLORS+--color=always} "$@" | mdw-pager
- else
- command $grep "$@"
- fi
-}
-alias grep="greplike grep"
-alias egrep="greplike egrep"
-alias fgrep="greplike fgrep"
-alias zgrep="greplike zgrep"
-
-# --- Set up some simple aliases ---
-
-alias cx='chmod a+x'
-alias which="command -v"
-alias ssync="rsync -e ssh"
-alias rootly=$__MDW_ROOTLY
-alias r=rootly
-alias re="rootly $EDITOR"
-alias pstree="pstree -hl"
-alias cdtmp='cd ${TMPDIR-/tmp}'
-alias pushtmp='pushd ${TMPDIR-/tmp}'
-alias e="$EDITOR"
-alias svn="svnwrap svn"
-alias @="ssh"
-
-[ -r /etc/bash_completion ] && . /etc/bash_completion
-[ -r $HOME/.bash_completion ] && . $HOME/.bash_completion
-
-# --- Make `xt' start an xterm, maybe logging into a remote host ---
-
-xt () {
- case "$1" in
- @*)
- local remote=${1#@} title
- shift
- if [ $# -gt 0 ]; then
- title="xterm [$remote] $1"
- else
- title="xterm [$remote]"
- fi
- (xterm -title "$title" -e ssh $remote "$@" &)
- ;;
- *)
- (xterm "$@" &)
- ;;
- esac
-}
-
-# --- Turning on and off core dumps ---
-
-core () {
- case "x$1" in
- xon|xy|xyes)
- ulimit -Sc `ulimit -Hc`
- ;;
- xoff|xn|xno)
- ulimit -Sc 0
- ;;
- x)
- local l=`ulimit -Sc`
- case $l in
- 0) echo "Core dumps disabled" ;;
- unlimited) echo "Core dumps enabled" ;;
- *) echo "Core dump limit is $l blocks" ;;
- esac
- ;;
- *)
- echo >&2 "usage: core [yn]"
- return 1
- ;;
- esac
-}
-
-# --- Turning on and off path hacks ---