]> git.rmz.io Git - dotfiles.git/blobdiff - zshrc
mv bash_aliases, more zsh settings
[dotfiles.git] / zshrc
diff --git a/zshrc b/zshrc
index 54dba8983012bb7bcc1d839d4f2873c4743b0ce5..a181dbd5f89195985026376a1cf92f214fb2322c 100644 (file)
--- a/zshrc
+++ b/zshrc
@@ -1,44 +1,68 @@
-# Lines configured by zsh-newuser-install
+# configure history
 HISTFILE=~/.histfile
-HISTSIZE=10000
-SAVEHIST=20000
-setopt histignoredups
-setopt histignorespace
-setopt appendhistory
+HISTSIZE=1000
+SAVEHIST=2000
+setopt hist_ignore_dups
+setopt hist_ignore_space
+setopt append_history
+setopt inc_append_history
+setopt extended_history
 
-setopt autocd
+# misc
 setopt beep
 setopt extendedglob
 setopt nomatch
 setopt noclobber    # don't allow overwriting files with '>', use '>!' instead
+setopt notify
 setopt rcquotes     # echo 'don''t'; prints don't
 
-unsetopt notify
+# key bindings
+bindkey -e  # emacs key bindings, vi is weird
+[[ -r ~/.zsh/bindkeyrc ]] && source ~/.zsh/bindkeyrc
 
-bindkey -e
-# End of lines configured by zsh-newuser-install
-# The following lines were added by compinstall
+# Completion
 zstyle :compinstall filename '/home/ramsi/.zshrc'
+zstyle ':completion:*' list-colors ''
 
+setopt complete_in_word     # allow completion in the middle of a word
 autoload -Uz compinit
 compinit
-# End of lines added by compinstall
+
+# populate path
+typeset -U path     # make path a unique array
+[[ -d ~/bin ]] && path=(~/bin $path)
+
+# load my functions
+typeset -U fpath    # make fpath a unique array
+[[ -d ~/.zsh/functions ]] && fpath=(~/.zsh/functions $fpath)
+autoload -U ${fpath[1]}/*(:t)   # loads all functions in the first element of fpath
 
 # source aliases
-[[ -f ~/.bash_aliases ]] && source ~/.bash_aliases
+[[ -f ~/.aliasesrc ]] && source ~/.aliasesrc
 
 # set up prompt
-autoload -U promptinit
-promptinit
-prompt walters
+autoload -U colors && colors
+PROMPT="%(?..%{$fg_bold[white]%}[%?])%{$reset_color%}[%D{%k:%M} %n@%{$fg[green]%}%m%{$reset_color%}]%# "
+RPROMPT="%{$fg[green]%}%~%{$reset_color%}"
 
 # make cd act like pushd
-DIRSTACKSIZE=10
-setopt autopushd    # cd acts like pushd
-setopt pushdminus   # inverts the meaning of cp -1 and cp +1
-setopt pushdsilent  # don't print dir stack everytime
-setopt pushdtohome  # pushd with no argumens pushes to ~
-alias dh='dirs -v'
+DIRSTACKSIZE=10          # number of dirs to remember
+setopt auto_pushd        # cd acts like pushd
+setopt pushd_minus       # inverts the meaning of cp -1 and cp +1
+setopt pushd_silent      # don't print dir stack everytime
+setopt pushd_to_home     # pushd with no argumens pushes to ~
+setopt pushd_ignore_dups # ignore dups in pushd/cd
+alias dh='dirs -v'       # show numbers with dirs
+
+setopt auto_cd           # if no command matches the input, try to cd into it; .. = cd ..
 
 # set search path for cd
-cdpath=( ~ /mnt )
+cdpath=(~ /mnt)
+
+# set up a few named directories
+hash -d Skaro=/mnt/Skaro
+hash -d ccr=~/ccr
+hash -d src=~/src
+hash -d chroot_testing=/buildsystem/testing/buildroot
+hash -d chroot_master=/buildsystem/master/buildroot
+hash -d chroot_lib32=/buildsystem/lib32/buildroot