Skip to content
Browse files

imported

  • Loading branch information...
0 parents commit f7c36e5bca6c8034336ab34eb21e0793413f6eea @hsbt committed Oct 26, 2011
Showing with 350 additions and 0 deletions.
  1. +6 −0 .gitmodules
  2. +1 −0 dot.CFUserTextEncoding
  3. +1 −0 dot.caprc
  4. +9 −0 dot.gemrc
  5. +2 −0 dot.gitignore
  6. +12 −0 dot.irbrc
  7. +1 −0 dot.nanorc
  8. +1 −0 dot.psqlrc
  9. +2 −0 dot.rspec
  10. +12 −0 dot.screenrc
  11. +15 −0 dot.zprofile
  12. +28 −0 dot.zsh.d/aliases
  13. +29 −0 dot.zsh.d/function
  14. +102 −0 dot.zsh.d/homebrew
  15. +1 −0 dot.zsh.d/zaw
  16. +1 −0 dot.zsh.d/zsh-completions
  17. +127 −0 dot.zshrc
6 .gitmodules
@@ -0,0 +1,6 @@
+[submodule "dot.zsh.d/zsh-completions"]
+ path = dot.zsh.d/zsh-completions
+ url = git://github.com/zsh-users/zsh-completions.git
+[submodule "dot.zsh.d/zaw"]
+ path = dot.zsh.d/zaw
+ url = git://github.com/zsh-users/zaw.git
1 dot.CFUserTextEncoding
@@ -0,0 +1 @@
+0x08000100:0
1 dot.caprc
@@ -0,0 +1 @@
+require "capistrano_colors"
9 dot.gemrc
@@ -0,0 +1,9 @@
+---
+:backtrace: false
+:benchmark: false
+:bulk_threshold: 1000
+:sources:
+- http://rubygems.org/
+:update_sources: true
+:verbose: true
+gem: --no-ri --no-rdoc
2 dot.gitignore
@@ -0,0 +1,2 @@
+.DS_Store
+.rvmrc
12 dot.irbrc
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+%w(irb/completion pp rubygems tapp what_methods).each do |l|
+ begin
+ require l
+ rescue LoadError
+ end
+end
+
+IRB.conf.update(
+ :SAVE_HISTORY => 10000,
+ :PROMPT_MODE => :SIMPLE
+)
1 dot.nanorc
@@ -0,0 +1 @@
+set nowrap
1 dot.psqlrc
@@ -0,0 +1 @@
+\set HISTFILE ~/Dropbox/config/dotfiles/private/.psql_history
2 dot.rspec
@@ -0,0 +1,2 @@
+--color
+--profile
12 dot.screenrc
@@ -0,0 +1,12 @@
+autodetach on
+escape ^Tt
+hardstatus alwayslastline "%w"
+shell zsh
+defscrollback 10000
+startup_message off
+vbell off
+
+defencoding utf-8
+encoding utf-8 utf-8
+
+termcapinfo xterm* ti@:te@
15 dot.zprofile
@@ -0,0 +1,15 @@
+# Environment
+export LANG=ja_JP.UTF-8
+export OUTPUT_CHARSET=UTF-8
+export ARCHFLAGS="-arch x86_64"
+export EDITOR="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient"
+export DROPBOX=$HOME/Dropbox
+
+export PATH=$PATH:/usr/local/mysql/bin:/usr/X11/bin:/usr/texbin
+export SUDO_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql/lib:$DROPBOX/app/oracle
+export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib:/usr/lib/:$DYLD_LIBRARY_PATH
+
+# gisty
+export GISTY_DIR=$DROPBOX/dev/gists
28 dot.zsh.d/aliases
@@ -0,0 +1,28 @@
+# global alias
+alias -g L='| less'
+alias -g G='| grep'
+alias -g H='| head'
+alias -g T='| tail'
+
+# application alias
+alias g='git'
+alias r='rails'
+alias b='bundle'
+
+alias reload='source $HOME/.zshrc'
+alias cdp='cd -P'
+alias dr='cd $DROPBOX'
+alias s3='s3cmd'
+
+alias grep="grep --color=auto --binary-files=without-match --directories=recurse"
+alias ls="gls --color"
+alias la='ls -lhAF'
+alias ll='ls -al'
+
+alias be='bundle exec'
+alias bo='bundle open'
+alias bu='bundle update'
+alias pr='padrino rake'
+
+alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs -nw"
+alias emacsclient="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient"
29 dot.zsh.d/function
@@ -0,0 +1,29 @@
+function chpwd() { ls }
+
+function up()
+{
+ to=$(perl -le '$p=$ENV{PWD}."/";$d="/".$ARGV[0]."/";$r=rindex($p,$d);$r>=0 && print substr($p, 0, $r+length($d))' $1)
+ cdp $to
+}
+
+function sc(){ cdp $1; screen }
+
+function cdb() {
+ cdp `ruby -rubygems -e "require 'bundler';Bundler.load.specs.each{|s| puts s.full_gem_path if s.name == '${1}'}"`
+}
+
+function git(){ hub "$@" }
+
+function screen-cd () {
+ local MATCH
+ LBUFFER=${LBUFFER%%(#m)[0-9]#}
+ local -A arg
+ arg=$MATCH
+ if grep "^$arg:" "$CDD_PWD_FILE" > /dev/null 2>&1 ;then
+ local -A res
+ res=`grep "^$arg:" "$CDD_PWD_FILE"|sed -e "s/^$arg://;"|tr -d "\n"`
+ LBUFFER+=$res
+ fi
+}
+zle -N screen-cd
+bindkey "^Xi" screen-cd
102 dot.zsh.d/homebrew
@@ -0,0 +1,102 @@
+brew_prefix=`brew --prefix`
+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 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"
+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 sed="$brew_prefix/bin/gsed"
+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 tar="$brew_prefix/bin/gtar"
+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 unit="$brew_prefix/bin/gunit"
+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["
1 dot.zsh.d/zaw
@@ -0,0 +1 @@
+Subproject commit 6d12817f126d7676f9594c4b6df1ed7a50443890
1 dot.zsh.d/zsh-completions
@@ -0,0 +1 @@
+Subproject commit 67e26d966c45701af3ced69de62fd67f665a98ba
127 dot.zshrc
@@ -0,0 +1,127 @@
+umask 022
+bindkey -e
+
+# Set shell options
+setopt always_last_prompt
+setopt auto_list
+setopt auto_menu
+setopt auto_cd
+setopt auto_param_keys
+setopt auto_name_dirs
+setopt auto_remove_slash
+setopt cdable_vars
+setopt correct
+setopt extended_glob
+setopt interactive_comments
+setopt list_packed
+setopt list_types
+setopt magic_equal_subst
+setopt no_beep
+setopt no_flow_control
+setopt prompt_subst
+setopt print_eight_bit
+setopt numeric_glob_sort
+setopt rm_star_silent
+setopt sun_keyboard_hack
+setopt sh_word_split
+setopt zle
+setopt long_list_jobs
+
+# Zsh module
+zmodload zsh/files
+
+autoload zmv
+alias zmv='noglob zmv'
+
+# Homebrew aliases
+#source $HOME/.zsh/homebrew
+
+# ls colors
+autoload colors; colors
+export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
+export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
+
+# autocomp
+fpath=($HOME/.zsh.d/zsh-completions $fpath)
+autoload -U compinit
+compinit -d /tmp/$USER.zcompdump
+zstyle ':completion:*:default' menu select=1
+zstyle ':completion:*:sudo:*' command-path
+zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
+zstyle ':completion:*' use-cache yes
+zstyle ':completion:*' verbose yes
+zstyle ':completion:sudo:*' environ PATH="$SUDO_PATH:$PATH"
+
+# Prompt setting
+autoload -Uz vcs_info
+zstyle ':vcs_info:*' enable git svn hg
+zstyle ':vcs_info:*' formats '[%b]'
+zstyle ':vcs_info:*' actionformats '[%b] (%a)'
+precmd() {
+ psvar=()
+ LANG=en_US.UTF-8 vcs_info
+ [[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
+ psvar[2]=`ruby -e 'puts "#{RUBY_VERSION}p#{RUBY_PATCHLEVEL > -1 ? RUBY_PATCHLEVEL : 0}"'`
+ [[ -e $PWD/.git/refs/stash ]] && psvar[3]="$(git stash list 2>/dev/null | wc -l) stashed"
+}
+PROMPT=$'[%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[red]%}%M%{$reset_color%}] %{$fg[cyan]%}%d %1(V|%F{green}%1v%3(V| - %3v|)%f |)%2(V|%F{red}(%2v%)%f|)\n%{$fg[yellow]%}%#%{$reset_color%} '
+RPROMPT=''
+
+# History
+setopt extended_history
+setopt share_history
+setopt hist_ignore_all_dups
+setopt hist_ignore_dups
+setopt hist_ignore_space
+setopt hist_save_nodups
+setopt hist_reduce_blanks
+setopt inc_append_history
+
+HISTFILE=$DROPBOX/config/dotfiles/private/dot.zsh-history
+HISTSIZE=10000000
+SAVEHIST=$HISTSIZE
+
+autoload history-search-end
+zle -N history-beginning-search-backward-end history-search-end
+zle -N history-beginning-search-forward-end history-search-end
+bindkey "^p" history-beginning-search-backward-end
+bindkey "^n" history-beginning-search-forward-end
+
+source $HOME/.zsh.d/zaw/zaw.zsh
+zstyle ':filter-select:highlight' matched fg=yellow,standout
+zstyle ':filter-select' max-lines 10 # use 10 lines for filter-select
+zstyle ':filter-select' max-lines -10 # use $LINES - 10 for filter-select
+zstyle ':filter-select' case-insensitive yes # enable case-insensitive search
+zstyle ':filter-select' extended-search yes # see below
+
+# Homebrew packages
+export PYTHONPATH=/usr/local/lib/python2.7/site-packages
+
+# MySQL
+export MYSQL_HISTFILE=$DROPBOX/config/dotfiles/private/.mysql_history
+export MYSQL_PS1='\u@\h[\d]> '
+
+# nodejs
+export NODE_PATH=$HOME/.npm/libraries:$NODE_PATH
+export PATH=$HOME/.npm/bin:$PATH
+export MANPATH=$HOME/.npm/man:$MANPATH
+
+# perlbrew
+export PERLBREW_ROOT="$HOME/.perlbrew"
+source $HOME/.perlbrew/etc/bashrc
+
+# pythonbrew
+source $HOME/.pythonbrew/etc/bashrc
+
+# rbenv
+export PATH="$HOME/.rbenv/bin:$PATH"
+source $HOME/.rbenv/completions/rbenv.zsh
+eval "$(rbenv init -)"
+
+# nave
+alias nave=$HOME/.nave/nave.sh
+
+# aliases & function
+source $HOME/.zsh.d/function
+source $HOME/.zsh.d/aliases

0 comments on commit f7c36e5

Please sign in to comment.
Something went wrong with that request. Please try again.