Browse files

use oh-my-zsh

  • Loading branch information...
1 parent 8f5263e commit 709162c286c3d0e26db3cc1fa7575cf26f77ef5f @thomasritz committed Feb 11, 2012
View
181 dot/zsh.d/S10_zshopts.zsh
@@ -1,181 +0,0 @@
-#! /bin/zsh
-
-autoload -U is-at-least
-
-#[ a ]##########################################################################
-setopt aliases # expand aliases
-setopt all_export # define = export
-#setopt always_last_prompt #
-setopt always_to_end # always go to end of word after completion
-setopt append_history # append to history, dont truncate it
-setopt auto_cd # do cd path if only 'path' is given as command
-setopt auto_continue # send SIGCONT to jobs disowned
-setopt auto_list # list choice on ambiguous command
-setopt auto_menu # show menu for completion
-setopt no_autoname_dirs # after foo=/absolute/path, ~foo may expand to
- # /absolute/path, but `%~' in prompt won't give
- # `~foo' until `~foo' has been used (rtfm closely)
-setopt auto_param_keys # remove trailing spaces after completion if needed
-setopt auto_param_slash # add slash for directories
-setopt auto_pushd # cd = pushd
-setopt auto_remove_slash # remove slash on dirs if word separator added
-setopt auto_resume # simgle word resume if possible
-
-#[ b ]##########################################################################
-setopt bad_pattern # warn on bad file patterns
-setopt bang_hist # yeah ! expansion
-setopt bare_glob_qual # () is quaifier list
-setopt no_bash_auto_list # auto_list is sufficient, i want it on first tab
-setopt beep # beep me o yeah
-setopt no_bg_nice # don't renice jobs in bg
-setopt brace_ccl # expand of {adasd}
-setopt no_bsd_echo # dont want BSD echo compat
-
-#[ c ]##########################################################################
-setopt case_glob # case sensitive globbing
-setopt c_bases # understand 12#120 as 120 in base 12
-setopt no_cdable_vars # dont add ~ automagically
-setopt no_chase_dots # foo/bar/.. is foo/ even if bar is a symlink
-setopt chase_links # cd to a symlink is in fact cd to the true dir
-setopt check_jobs # check jobs on exit
-setopt clobber # redirection can create files
-setopt complete_aliases # dont replace alias before completion
-setopt complete_in_word # we want completion to be done from cursor in word
-setopt correct # try to correct command line
-setopt no_correct_all # don't coorect args
-setopt no_csh_junkiehistory # csh sucks
-setopt no_csh_junkie_loops # want do /list/; done
-setopt no_csh_junkie_quotes # csh quote rules sucks too
-setopt no_csh_nullcmd # want to keep my (READ)?NULLCMD settings
-setopt no_csh_null_glob # don't erase not matched globs silently
-
-#[ d-g ]########################################################################
-setopt no_dvorak # use only regular (qw|az)erty
-setopt no_emacs # use rather bindkeys that builtin
-setopt equals # perform = file expansions
-setopt no_err_exit # don't weant to see exit status even if nonzero
-setopt no_err_return # no return from a function with non 0 ending cmds
-setopt exec # sure we want to exec commands
-setopt extended_glob # #,~,^ expansion
-setopt no_extended_history # regular history
-setopt no_flow_control # ignore ^S/^Q
-setopt function_argzero # $0 == name of script
-setopt glob # sure i want globbing
-setopt no_global_export # local vars are not globals one
-setopt global_rcs # use global rcs
-setopt no_glob_assign # no globbing on foo=*, use foo=(*)
-setopt no_glob_complete # don't generate matches and cycle through them
-setopt no_glob_dots # not require . in filename to be match explicitely
-setopt no_glob_subst # no recursive expansion
-
-#[ h-j ]########################################################################
-setopt hash_cmds # do not always search through path, hash cmds
-setopt hash_dirs # hash directories holding commands too
-setopt hash_list_all # verify path hash on completion
-setopt hist_allow_clobber # add | to redirections in history
-setopt no_hist_beep # don't beep on history expansion errors
-#setopt hist_expire_dups_first
-setopt hist_find_no_dups # don't show dups even if not contiguous
-setopt hist_ignore_all_dups # ignore all -- even non contiguous -- dups
-#setopt hist_ignore_dups # ignore contiguous dups
-setopt no_hist_ignore_space # historify commands with spaces too
-setopt hist_no_functions # don't save functions defs in history
-setopt hist_no_store # remove hists access cmds from hist
-setopt hist_reduce_blanks # remove superfluous blanks
-setopt hist_save_no_dups # no dups on history saving
-setopt hist_verify # some expansion gadget
-setopt hup # SIGHUP cmds on logout
-setopt no_ignore_braces # do braces expansion
-setopt no_ignore_eof # don't ignore ^D
-setopt no_inc_appendhistory # dont' append incrementally
-#setopt interactive
-setopt interactive_comments # allow comments in interactive shell
-
-#[ k-o ]########################################################################
-setopt no_ksh_arrays # don't emulate ksh arrays
-setopt no_ksh_autoload # don't do some dark autoload on function call
-setopt no_ksh_glob # ignore @ before ()
-setopt ksh_option_print # modify setopt output
-setopt no_ksh_typeset # use zsh typeset
-setopt list_ambiguous # unambiguous prefix completion is done silently
-setopt no_list_beep # don't beep for completion
-setopt list_packed # different width for completion
-setopt no_list_rows_first # sort by colums
-setopt list_types # show types of listing files
-#setopt local_* # used in functions RTFM
-#setopt login # don't have to do it myself
-setopt long_list_jobs # list jobs in long format
-setopt magic_equal_subst # foo= is file expanded
-setopt no_mail_warning # auto-explained
-setopt mark_dirs # adds / on dirs in filename completion
-setopt no_menu_complete # don't show menu on ambiguous completion
-setopt monitor # job control
-setopt multios # multi redirection allowed
-setopt nomatch # print error on non matched patterns
-setopt notify # notify immediately, not on next prompt
-setopt no_null_glob # don't delete not matched globs
-setopt numeric_glob_sort # sort in numeric order rather than lexicographic
-setopt no_octal_zeroes # 010 = 9 sucks
-setopt no_overstrike # dont start le in overstrike mode
-
-#[ p-r ]########################################################################
-setopt path_dirs # search in path even if cmd has '/' in it
-setopt no_posix_builtins # yeah don't like posix, i'm a rebel
-setopt print_eight_bit # just to be sure
-#setopt privileged #
-setopt no_prompt_bang # dont perform history expansion in prompt
-setopt no_prompt_cr # don'tprint <cr> before prompt ---> see precmd !
-setopt prompt_percent # expand % escapes in prompt
-setopt prompt_subst # subts in prompt
-setopt pushd_ignore_dups # ignore dups in pushd
-#setopt pushd_minus # exchange +/-
-setopt pushd_silent # don't print stack after push/pop
-setopt pushd_to_home # pushd == pushd $HOME
-setopt rc_expand_param # some expansion trick for arrays in params
-setopt rc_quotes # '' == ' in 'quoted exprs
-setopt rcs # source all /etc rcs
-setopt no_rec_exact # recognize exact match even if ambiguous
-#setopt restricted #
-setopt no_rm_star_silent # ask user before rm foo/*
-setopt no_rm_star_wait # dont't idle 10 seconds
-
-#[ s-z ]########################################################################
-setopt no_share_history # traditional bash-history
-setopt no_sh_file_expansion # dont expand filnames first
-setopt no_sh_glob # allow globbing with [(|)<]
-#setopt shin_stdin #
-setopt no_sh_nullcmd # use my NULLCMD
-setopt sh_option_letters # interprete single option letters a la ksh
-setopt short_loops # short loops
-setopt no_sh_word_split # `s="a b"; a=($s)' => array of length 1, not 2
-#setopt single_command #
-setopt no_single_line_zle # use multiline editor
-setopt no_sun_keyboard_hack # i don't use sun kb
-setopt transient_rprompt # better for cut/paste
-#setopt typeset_silent #
-#setopt unset #
-#setopt verbose #
-setopt vi # use bindkeys
-setopt no_xtrace # do not debug by default
-setopt zle # use zsh le
-
-is-at-least 4.3.0 && {
- unsetopt hist_save_by_copy
-}
-
-# http://xanana.ucsc.edu/~wgscott/wordpress_new/wordpress/?p=12
-typeset -ga preexec_functions
-typeset -ga precmd_functions
-typeset -ga chpwd_functions
-
-[ -w $zsh_cache ] && HISTFILE=$zsh_cache/history
-
-HISTSIZE=10000 # size of history
-LISTMAX=1000 # never ask
-NULLCMD='cat' # use cat for > null commands
-REPORTTIME=2 # report time if execution exceeds amount of seconds
-SAVEHIST=10000 # maximum of history events to be save
-LOGCHECK=60
-watch=(notme) # watch login/logout
-WORDCHARS="*?_-.[]~/&;!#$%^(){}<>"
- # part of word in line editor
View
2 dot/zsh.d/S15_colors.zsh
@@ -1,2 +0,0 @@
-autoload colors
-colors
View
23 dot/zsh.d/S20_environment.zsh
@@ -1,23 +0,0 @@
-#! /bin/zsh
-
-if [ x"$HOME" = x ] ; then
- export HOME=$(cd ~ ; pwd)
-fi
-
-if [ x"$HOSTNAME" = x ] ; then
- export HOSTNAME=$(hostname)
-fi
-
-export GREP_OPTIONS="--color"
-export EDITOR=vim
-export VISUAL=vim
-export LESS="-R -M --shift 5"
-
-# this makes man pages look nicer...
-export LESS_TERMCAP_mb=$'\E[01;31m'
-export LESS_TERMCAP_md=$'\E[01;31m'
-export LESS_TERMCAP_me=$'\E[0m'
-export LESS_TERMCAP_se=$'\E[0m'
-export LESS_TERMCAP_so=$'\E[01;44;33m'
-export LESS_TERMCAP_ue=$'\E[0m'
-export LESS_TERMCAP_us=$'\E[01;32m'
View
30 dot/zsh.d/S30_binds.zsh
@@ -1,30 +0,0 @@
-#! /bin/zsh
-
-# see S10_zshopts for vi/emacs binding
-
-# type the beginning of a command... and press the <up> key!
-bindkey "^[[A" up-line-or-search
-bindkey "^[[B" down-line-or-search
-
-bindkey "^A" vi-beginning-of-line
-bindkey "^E" vi-end-of-line
-
-bindkey "^K" kill-line
-bindkey "^L" clear-screen
-bindkey "^R" history-incremental-search-backward
-bindkey "^F" history-incremental-search-forward
-bindkey "^W" backward-kill-word
-
-bindkey "^N" down-history
-bindkey "^P" up-history
-
-bindkey "^D" delete-char
-bindkey '\e[3~' delete-char
-bindkey '\e[1~' beginning-of-line
-bindkey '\e[4~' end-of-line
-bindkey '\eOH' beginning-of-line
-bindkey '\eOF' end-of-line
-
-
-# shortcut
-bindkey -s "^O" "ls\n"
View
52 dot/zsh.d/S40_completion.zsh
@@ -1,52 +0,0 @@
-#! /bin/zsh
-
-zstyle ':completion:*' add-space true
-zstyle ':completion:*' completer _expand _complete _match _prefix _approximate _list
-zstyle ':completion:*' menu select=1
-zstyle ':completion:*' file-sort name
-zstyle ':completion:*' list-colors ${(s.:.)ZLS_COLORS}
-zstyle ':completion:*' matcher-list 'r:|[._-]=** r:|=**' 'l:|=** r:|=**'
-zstyle ':completion:*' menu select
-zstyle ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
-
-#[ Formats ]####################################################################
-zstyle ':completion:*' group 1
-zstyle ':completion:*' format '%B---- %d%b'
-zstyle ':completion:*:corrections' format '%B---- %d (errors %e)%b'
-zstyle ':completion:*:descriptions' format "%B---- %d%b"
-zstyle ':completion:*:messages' format '%B%U---- %d%u%b'
-zstyle ':completion:*:warnings' format "%B$fg[red]%}---- no match for: $fg[white]%d%b"
-zstyle ':completion:*' group-name ''
-
-#[ Kill ]#######################################################################
-zstyle ':completion:*:processes' command 'ps -au$USER -o pid,time,cmd|grep -v "ps -au$USER -o pid,time,cmd"'
-zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)[ 0-9:]#([^ ]#)*=01;30=01;31=01;38'
-
-#[ hosts and users ]############################################################
-#hosts=()
-#[ -r ~/.ssh/config ] && hosts=(${${${$(grep '^Host' ~/.ssh/config)}##Host }##[*0-9]*})
-#[ -r ~/.ssh/known_hosts ] && hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%\*}%,*})
-hosts=($((
- ( [ -r .ssh/config ] && awk '/^host +[a-z]/ { print $2 }' .ssh/config) ;\
- ( [ -r .ssh/known_hosts ] && awk '{print $1}' .ssh/known_hosts | tr , '\n')
-) | sort -u))
-
-zstyle ':completion:*' hosts $hosts
-zstyle ':completion:*:hosts' list-colors '=(#b)(*)(.jukie.net)=01;30=01;31' '=[^.]#=01;31'
-
-users=(root tritz thomas)
-zstyle ':completion:*' users $users
-
-zstyle ':completion:*:*:[ak]dvi:*' file-patterns \
- '*.dvi:dvi-files:DVI\ files *(-/):directories:Directories' '*:all-files'
-zstyle ':completion:*:*:kghostview:*' file-patterns \
- '*.(ps|pdf)(|.gz|.bz2):pspdf-files:PostScript\ or\ PDF\ files *(-/):directories:Directories' '*:all-files'
-zstyle ':completion:*:*:swfplayer:*' file-patterns \
- '*.swf:swf-files:Swf\ files *(-/):directories:Directories' '*:all-files'
-
-zstyle ':completion:*' file-patterns \
- '%p:globbed-files: *(-/):directories:Directories' '*:all-files'
-
-#[ ignores for vim ]############################################################
-
-zstyle ':completion:*:*:vi(m|):*:*files' ignored-patterns '*?.(aux|dvi|ps|pdf|bbl|toc|lot|lof|o|cm?)'
View
47 dot/zsh.d/S50_aliases.zsh
@@ -1,47 +0,0 @@
-#!/bin/zsh
-
-unalias -m '*'
-
-autoload zmv
-alias mmv='noglob zmv -W'
-
-alias :q='exit'
-alias :e='vim'
-alias :n='vim'
-
-case "${OSTYPE}" in
- freebsd*|darwin*)
- alias ls="ls -G -w -F"
- ;;
- linux*)
- alias ls="ls --color=auto -F"
- ;;
-esac
-
-alias l='ls -l'
-alias la='ls -la'
-alias lh='ls -lh'
-alias lsd='ls -ld *(-/DN)' # List only dirs and symlinks that point to dirs
-alias lsa='ls -ld .*' # List only file beginning with "."
-alias mv='nocorrect mv' # no spelling correction on mv
-alias cp='nocorrect cp' # no spelling correction on cp
-alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
-alias -- +=pushd
-alias -- -=popd
-alias j=jobs
-alias git='nocorrect git'
-alias gst='nocorrect git st'
-alias gs='nocorrect git show'
-alias bx='nocorrect bundle exec'
-
-wt() {
- while true ; do ( $@ ) ; sleep 1 ; clear ; done
-}
-
-yyyymmdd () { date +%Y%m%d ; }
-yyyymmdd-hhmmss () { date +%Y%m%d-%H%M%S ; }
-alias ymd=yyyymmdd
-alias ymd-hms=yyyymmdd-hhmmss
-
-function vman() { vim -c ":RMan ${*}" ; }
-function vimgrep () { tmp="$@" ; vim -c "vimgrep $tmp" ; }
View
47 dot/zsh.d/S60_prompt.zsh
@@ -1,47 +0,0 @@
-# zgitinit and prompt_rittsu_setup must be somewhere in your $fpath, see README for more.
-
-setopt promptsubst
-
-function git_prompt_info() {
- local ref branch
-
- ref=$(git symbolic-ref HEAD 2> /dev/null) || return
- branch=${ref#refs/heads/}
-
- echo -n " ‹%{$fg[blue]%}${branch}%{$reset_color%}›"
- echo
-}
-
-function ruby_prompt() {
- echo " ‹%{$fg[green]%}ruby $(rbenv version-name 2>/dev/null)%{$reset_color%}›"
-}
-
-prompt_precmd() {
- local ex=$?
- psvar=()
-
- if [[ $ex -ge 128 ]]; then
- sig=$signals[$ex-127]
- psvar[1]="sig${(L)sig}"
- else
- psvar[1]="$ex"
- fi
-}
-
-PROMPT=
-PROMPT+="%{$fg[cyan]%}%(2~.%~.%/)%{$reset_color%}"
-PROMPT+="\$(git_prompt_info)"
-PROMPT+="\$(ruby_prompt)"
-PROMPT+="
-"
-PROMPT+="%{$fg[yellow]%}%(!.#.∴)%{$reset_color%} "
-
-
-RPROMPT=
-if [[ $TERM != screen* ]] || [ -z "$STY" ]; then
- RPROMPT+="%{$fg[cyan]%}%D{%Y-%m-%d} %{$fg[blue]%}%D{%T}%{$reset_color%} "
-fi
-RPROMPT+="%{$fg[cyan]%}%n@%m%{$reset_color%}"
-RPROMPT+="%(?.. %{$fg[red]%}exited %1v%{$reset_color%})"
-
-precmd_functions+='prompt_precmd'
View
5 dot/zsh.d/S70_misc.zsh
@@ -1,5 +0,0 @@
-
-autoload -U zargs
-# (To remove all the ~ files recursively and prevent rm to have to many
-# arguments):
-# zargs **/*~ -- rm
View
108 dot/zsh.d/S80_homebrew.zsh
@@ -1,108 +0,0 @@
-if [[ $(uname) == Darwin ]]; then
-
- brew_prefix=`brew --prefix`
-
- # check for package 'coreutils'
- if [ -f $brew_prefix/bin/gbase64 ]; then
- alias base64="$brew_prefix/bin/gbase64"
- alias basename="$brew_prefix/bin/gbasename"
- alias cat="$brew_prefix/bin/gcat"
- alias chcon="$brew_prefix/bin/gchcon"
- alias chgrp="$brew_prefix/bin/gchgrp"
- alias chmod="$brew_prefix/bin/gchmod"
- alias chown="$brew_prefix/bin/gchown"
- alias chroot="$brew_prefix/bin/gchroot"
- alias cksum="$brew_prefix/bin/gcksum"
- alias comm="$brew_prefix/bin/gcomm"
- alias cp="$brew_prefix/bin/gcp"
- alias csplit="$brew_prefix/bin/gcsplit"
- alias cut="$brew_prefix/bin/gcut"
- alias date="$brew_prefix/bin/gdate"
- alias dd="$brew_prefix/bin/gdd"
- alias df="$brew_prefix/bin/gdf"
- alias dir="$brew_prefix/bin/gdir"
- alias dircolors="$brew_prefix/bin/gdircolors"
- alias dirname="$brew_prefix/bin/gdirname"
- alias du="$brew_prefix/bin/gdu"
- alias echo="$brew_prefix/bin/gecho"
- alias env="$brew_prefix/bin/genv"
- alias expand="$brew_prefix/bin/gexpand"
- alias expr="$brew_prefix/bin/gexpr"
- alias factor="$brew_prefix/bin/gfactor"
- alias false="$brew_prefix/bin/gfalse"
- alias fmt="$brew_prefix/bin/gfmt"
- alias fold="$brew_prefix/bin/gfold"
- alias groups="$brew_prefix/bin/ggroups"
- alias head="$brew_prefix/bin/ghead"
- alias hostid="$brew_prefix/bin/ghostid"
- alias id="$brew_prefix/bin/gid"
- alias install="$brew_prefix/bin/ginstall"
- alias join="$brew_prefix/bin/gjoin"
- alias kill="$brew_prefix/bin/gkill"
- alias link="$brew_prefix/bin/glink"
- alias ln="$brew_prefix/bin/gln"
- alias logname="$brew_prefix/bin/glogname"
- alias ls="$brew_prefix/bin/gls --color=auto -F"
- alias md5sum="$brew_prefix/bin/gmd5sum"
- alias mkdir="$brew_prefix/bin/gmkdir"
- alias mkfifo="$brew_prefix/bin/gmkfifo"
- alias mknod="$brew_prefix/bin/gmknod"
- alias mktemp="$brew_prefix/bin/gmktemp"
- alias mv="$brew_prefix/bin/gmv"
- alias nice="$brew_prefix/bin/gnice"
- alias nl="$brew_prefix/bin/gnl"
- alias nohup="$brew_prefix/bin/gnohup"
- alias od="$brew_prefix/bin/god"
- alias paste="$brew_prefix/bin/gpaste"
- alias pathchk="$brew_prefix/bin/gpathchk"
- alias pinky="$brew_prefix/bin/gpinky"
- alias pr="$brew_prefix/bin/gpr"
- alias printenv="$brew_prefix/bin/gprintenv"
- alias printf="$brew_prefix/bin/gprintf"
- alias ptx="$brew_prefix/bin/gptx"
- alias pwd="$brew_prefix/bin/gpwd"
- alias readlink="$brew_prefix/bin/greadlink"
- alias rm="$brew_prefix/bin/grm"
- alias rmdir="$brew_prefix/bin/grmdir"
- alias runcon="$brew_prefix/bin/gruncon"
- alias seq="$brew_prefix/bin/gseq"
- alias sha1sum="$brew_prefix/bin/gsha1sum"
- alias sha224sum="$brew_prefix/bin/gsha224sum"
- alias sha256sum="$brew_prefix/bin/gsha256sum"
- alias sha384sum="$brew_prefix/bin/gsha384sum"
- alias sha512sum="$brew_prefix/bin/gsha512sum"
- alias shred="$brew_prefix/bin/gshred"
- alias shuf="$brew_prefix/bin/gshuf"
- alias sleep="$brew_prefix/bin/gsleep"
- alias sort="$brew_prefix/bin/gsort"
- alias split="$brew_prefix/bin/gsplit"
- alias stat="$brew_prefix/bin/gstat"
- alias stty="$brew_prefix/bin/gstty"
- alias sum="$brew_prefix/bin/gsum"
- alias sync="$brew_prefix/bin/gsync"
- alias tac="$brew_prefix/bin/gtac"
- alias tail="$brew_prefix/bin/gtail"
- alias tee="$brew_prefix/bin/gtee"
- alias test="$brew_prefix/bin/gtest"
- alias touch="$brew_prefix/bin/gtouch"
- alias tr="$brew_prefix/bin/gtr"
- alias true="$brew_prefix/bin/gtrue"
- alias tsort="$brew_prefix/bin/gtsort"
- alias tty="$brew_prefix/bin/gtty"
- alias uname="$brew_prefix/bin/guname"
- alias unexpand="$brew_prefix/bin/gunexpand"
- alias uniq="$brew_prefix/bin/guniq"
- alias unlink="$brew_prefix/bin/gunlink"
- alias uptime="$brew_prefix/bin/guptime"
- alias users="$brew_prefix/bin/gusers"
- alias vdir="$brew_prefix/bin/gvdir"
- alias wc="$brew_prefix/bin/gwc"
- alias who="$brew_prefix/bin/gwho"
- alias whoami="$brew_prefix/bin/gwhoami"
- alias yes="$brew_prefix/bin/gyes"
- alias '['="$brew_prefix/bin/g["
-
- eval $(gdircolors ~/.dir_colors)
- fi
-
-fi
View
18 dot/zshrc
@@ -1,18 +0,0 @@
-autoload -U compinit zrecompile
-
-zsh_cache=${HOME}/.zsh_cache
-mkdir -p $zsh_cache
-
-if [ $UID -eq 0 ]; then
- compinit
-else
- compinit -d $zsh_cache/zcomp-$HOST
- for f in ~/.zshrc $zsh_cache/zcomp-$HOST; do
- zrecompile -p $f && rm -f $f.zwc.old
- done
-fi
-
-setopt extended_glob
-for zshrc_snipplet in ~/.zsh.d/S[0-9][0-9]*.zsh ; do
- source $zshrc_snipplet
-done

0 comments on commit 709162c

Please sign in to comment.