dots/zshrc
Jacobi Carter ce5a60f62b Fixes
2016-11-03 21:30:53 -07:00

60 lines
1.2 KiB
Bash

# .zshrc
# Current author: David Majnemer
# Original author: Saleem Abdulrasool <compnerd@compnerd.org>
# vim:set nowrap:
case `uname -s` in
Darwin)
export LHOSTNAME=`scutil --get LocalHostName`
;;
*)
export LHOSTNAME=${HOST}
;;
esac
autoload compinit; compinit -d "${HOME}/.zsh/.zcompdump-${LHOSTNAME}"
autoload age
autoload zmv
if [ ${ZSH_VERSION//.} -gt 420 ] ; then
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
fi
autoload -U edit-command-line
zle -N edit-command-line
# Keep track of other people accessing the box
watch=( all )
export LOGCHECK=30
export WATCHFMT=$'\e[00;00m\e[01;36m'" -- %n@%m has %(a.logged in.logged out) --"$'\e[00;00m'
# directory hashes
if [ -d "${HOME}/sandbox" ] ; then
hash -d sandbox="${HOME}/sandbox"
fi
if [ -d "${HOME}/work" ] ; then
hash -d work="${HOME}/work"
for dir in "${HOME}"/work/*(N-/) ; do
hash -d $(basename "${dir}")="${dir}"
done
fi
# common shell utils
if [ -d "${HOME}/.commonsh" ] ; then
for file in "${HOME}"/.commonsh/*(N.x:t) ; do
. "${HOME}/.commonsh/${file}"
done
fi
# extras
if [ -d "${HOME}/.zsh" ] ; then
for file in "${HOME}"/.zsh/*(N.x:t) ; do
. "${HOME}/.zsh/${file}"
done
fi
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting