From: Ben Beltran Date: Fri, 19 Oct 2012 17:02:56 +0000 (-0500) Subject: Add Zshrc and my zsh-theme X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/commitdiff_plain/9041bd938fcce0cf91032c67d529bc21fedeeed3 Add Zshrc and my zsh-theme --- diff --git a/ben-prose.zsh-theme b/ben-prose.zsh-theme new file mode 100644 index 0000000..b6825ac --- /dev/null +++ b/ben-prose.zsh-theme @@ -0,0 +1,32 @@ +if [ "x$OH_MY_ZSH_HG" = "x" ]; then + OH_MY_ZSH_HG="hg" +fi + +function rvm_info { + echo '('`rvm-prompt`') ' +} + +function hg_prompt_info { + $OH_MY_ZSH_HG prompt --angle-brackets "\ +< on %{$fg[magenta]%}%{$reset_color%}>\ +< at %{$fg[yellow]%}%{$reset_color%}>\ +%{$fg[green]%}%{$reset_color%}< +patches: >" 2>/dev/null +} + +function box_name { + [ -f ~/.box-name ] && cat ~/.box-name || hostname -s +} + +PROMPT=' +%{$fg[red]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) %{$fg[black]%}$(rvm_info)%{$reset_color%} +%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ ' + +ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}" +RPROMPT='${return_status}%{$reset_color%}' diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..c76bfad --- /dev/null +++ b/zshrc @@ -0,0 +1,63 @@ +# Path to your oh-my-zsh configuration. +ZSH=$HOME/.oh-my-zsh + +# Set name of the theme to load. +# Look in ~/.oh-my-zsh/themes/ +# Optionally, if you set this to "random", it'll load a random theme each +# time that oh-my-zsh is loaded. +export ZSH_THEME="ben-prose" + +# Set to this to use case-sensitive completion +# CASE_SENSITIVE="true" + +# Comment this out to disable weekly auto-update checks +# DISABLE_AUTO_UPDATE="true" + +# Uncomment following line if you want to disable colors in ls +# DISABLE_LS_COLORS="true" + +# Uncomment following line if you want to disable autosetting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment following line if you want disable red dots displayed while waiting for completion +# DISABLE_COMPLETION_WAITING_DOTS="true" + +# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) +# Example format: plugins=(rails git textmate ruby lighthouse) +plugins=(git brew bundler cap gem osx rails3 rvm) + +source $ZSH/oh-my-zsh.sh + +# +# Some Custom things saved from my bash profile +# + +export TERM=screen-256color +export JAVA_HOME=$(/usr/libexec/java_home) +export PATH=/usr/local/bin:/usr/local/sbin:$PATH +export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH + +#display fortune when I start +echo -e "\033[30m" +/usr/local/bin/fortune +echo -e "\033[m" + +#some aliases. +alias dwarffortress="/Applications/Dwarf\ Fortress/df" +alias ls="ls -FG" +alias rspec="rspec --color" + +#Git utility aliases +alias gpsc="git push origin $GIT_BRANCH" +alias gplc="git pull origin $GIT_BRANCH" + +#Screeninator and RVM scripts +[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm + +# +# End of the custom things from my bash profile. +# There's probably a more "zsh-ish" way of doing these, but I have no time. +# + +# Customize to your needs... +export PATH=/Users/benbeltran/.rvm/gems/ruby-1.9.3-p194/bin:/Users/benbeltran/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/benbeltran/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/benbeltran/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin