Permalink
Browse files

basic zshrc

  • Loading branch information...
1 parent cfe4dbd commit 08351c7438767454767eb5f1f73e4d360f5f66db @richardc committed Oct 28, 2011
Showing with 60 additions and 0 deletions.
  1. +60 −0 _zshrc
View
@@ -0,0 +1,60 @@
+# .zhrsc - configuration for interactive zsh
+
+# use emacs/readline bindings
+bindkey -e
+
+# set the path
+# my path, not yours
+PATH="$HOME/bin"
+PATH="$PATH:/usr/lib/ccache" # ccache symlinks on debian
+PATH="$PATH:/usr/lib64/ccache" # ccache symlinks on CentOS (x86_64)
+
+ccache=$( echo /usr/local/Cellar/ccache/*/libexec )
+[[ -e "$ccache" ]] && PATH="$PATH:$ccache" # ccache symlinks on OSX (brew)
+
+PATH="$PATH:/opt/xt/xt-perl/bin" # nap machines
+PATH="$PATH:/usr/local/bin:/usr/local/sbin"
+PATH="$PATH:/usr/bin:/usr/sbin"
+PATH="$PATH:/bin:/sbin"
+export PATH
+
+
+# set up the prompt
+PROMPT='%B[%D{%Y-%m-%d} %*] %n@%m:%~%b
+%# '
+
+# save history to ~/.zshhistory
+HISTFILE=~/.zshhistory
+HISTSIZE=3000
+SAVEHIST=3000
+# flush it often so it's available to all shells
+setopt share_history
+
+# populate SSH_AUTH_SOCK
+# we may want to do this later without restarting
+reset_ssh_agent() {
+ if [ $( uname ) = "Darwin" ]; then
+ eval `launchctl export | grep SSH_AUTH_SOCK`
+ else
+ agent=($(find /tmp -type s -name "agent.*" 2>/dev/null))
+ if [ -S $agent ]; then
+ export SSH_AUTH_SOCK=$agent
+ fi
+ fi
+}
+
+reset_ssh_agent
+
+# xdg-open(1) on Linux, open(1) on OSX
+[ $( uname ) = "Linux" ] && alias open=xdg-open
+
+alias vi=vim
+
+# enable perlbrew http://search.cpan.org/perldoc?perlbrew
+[[ -s "$HOME/perl5/perlbrew/etc/bashrc" ]] && source "$HOME/perl5/perlbrew/etc/bashrc"
+
+# enable rvm http://rvm.beginrescueend.com/
+[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
+
+# enable pythonbrew https://github.com/utahta/pythonbrew
+[[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc"

0 comments on commit 08351c7

Please sign in to comment.