From ce63e3f83c6366508f45aaf3e6aa7b6a94b85b0d Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 16 Apr 2012 12:19:58 -0700 Subject: [PATCH] Clean up zshrc; add comments --- zshrc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/zshrc b/zshrc index ec1f310..7e5f359 100644 --- a/zshrc +++ b/zshrc @@ -1,6 +1,13 @@ # .zshrc +# vim: ft=zsh +# +# ZSH init for interactive shells +# # Eryn Wells +# load bash/zsh/ksh agnostic configurations +source $HOME/.rc + # PROMPT # ' histnum bgjobsflag time (%|#)' # Colors are determined based on zsh capability (>= version 4.3.7) @@ -16,12 +23,6 @@ else bgjob="%(1j.%{$fg_bold[magenta]%}* %{$reset_color%}.)" hist="%(0?.%h.%{$fg_bold[red]%}%h%{$reset_color%})" isroot="%(!.%{$fg_bold[red]%}%#%{$reset_color%}.%#)" - - # where do I include these? - #bgjob="%(1j.%B*%b.)" - #cmdstat="%(0?..%B!%b)" - #isroot="%(!.%B#%b.)" - #mytime="%T" fi PROMPT=" $hist $bgjob$isroot " @@ -77,9 +78,6 @@ setopt \ EXTENDED_GLOB \ MULTIOS -# load bash/zsh/ksh agnostic configurations -source $HOME/.rc - alias pd='pushd' alias pod='popd' @@ -111,16 +109,21 @@ HISTFILE="$HOME/.zhistory" #[ -n "$DISPLAY" ] && alias -s pdf='evince' #[ -n "$DISPLAY" ] && alias -s dvi='evince' -# host specific initialization -[ -e $HOME/.zshrc-local ] && . ~/.zshrc-local +# Set up dircolors +if [ -e $HOME/.dircolors/$sys.cfg ]; then + dircolors=$HOME/.dircolors/$sys.cfg +else + dircolors=$HOME/.dircolors/default.cfg +fi +eval `dircolors $dircolors` # emacs command line editing bindkey -v -# +### # Completion -# +### # load completion system autoload -U compinit @@ -158,8 +161,11 @@ fpath=($HOME/.zsh/func $fpath) # Wikipedia lookup, courtesy of msanders@github autoload wiki +# Make a Maildir autoload mkmdir +# Generate a password autoload pw +# Make a C module (.c and .h pair) autoload mkcmod # Go up $1 directories, where $1 is an integer (saves me from having to type ../ @@ -178,11 +184,5 @@ function up { } -# Toggle showing a separator before every command -function tsep { - if (($precmd_functions[(Ie)precmd_separator] > 0)); then - precmd_functions=${precmd_functions#precmd_separator} - else - precmd_functions+=(precmd_separator) - fi -} +[ -e $HOME/.zshrc.$SYS ] && source $HOME/.zshrc.$SYS +[ -e $HOME/.zshrc.local ] && source $HOME/.zshrc.local