From 35047dd70ca066b3f9b1cc024036a8deac485532 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Mon, 30 Apr 2012 21:39:22 -0500 Subject: [PATCH] Adding zsh config --- zsh/aliases.zsh | 25 +++++++++++++++++++++++++ zsh/zshrc.symlink | 27 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 zsh/aliases.zsh create mode 100644 zsh/zshrc.symlink diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh new file mode 100644 index 0000000..c659b9d --- /dev/null +++ b/zsh/aliases.zsh @@ -0,0 +1,25 @@ +# Filesystem aliases +alias ..='cd ..' +alias ...='cd ../..' +alias l='ls -lah' +alias la='ls -AF' +alias ll='ls -lFh' +alias lld='ls -l | grep ^d' +alias rmf='rm -rf' + +# Helpers +alias grep='grep --color=auto' +alias df='df -h' # disk free, in Gigabytes, not bytes +alias du='du -h -c' # calculate disk usage for a folder + +# git aliases +alias g='git' +alias ga='git add' +alias gb='git branch' +alias gl='git pull' +alias gp='git push' +alias gst='git s' +alias gs='git stash save' +alias gsp='git stash pop' +alias gmv='git mv' +alias grm='git rm' diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink new file mode 100644 index 0000000..1bfc548 --- /dev/null +++ b/zsh/zshrc.symlink @@ -0,0 +1,27 @@ +export ZSH=$HOME/.dotfiles + +if [[ -d ~/gitprojects ]]; then + export PROJECTS=~/gitprojects +else + export PROJECTS=~/projects +fi + +# load all zsh config files +for config ($ZSH/**/*.zsh) source $config + +if [[ -a ~/.localrc ]]; then + source ~/.localrc +fi + +# initialize autocomplete +autoload -U compinit +compinit + +for config ($ZSH/**/completion.sh) source $config + +export EDITOR='vim' + +# check for custom bin directory and add to path +if [[ -d ~/bin ]]; then + export PATH=~/bin:$PATH +fi