Adding zsh config

This commit is contained in:
Nick Nisi
2012-04-30 21:39:22 -05:00
parent 96cc9a727a
commit 35047dd70c
2 changed files with 52 additions and 0 deletions

25
zsh/aliases.zsh Normal file
View File

@@ -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'

27
zsh/zshrc.symlink Normal file
View File

@@ -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