Skip to content

Instantly share code, notes, and snippets.

@christophrumpel
Created April 11, 2013 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christophrumpel/5360892 to your computer and use it in GitHub Desktop.
Save christophrumpel/5360892 to your computer and use it in GitHub Desktop.
# 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.
ZSH_THEME="prose"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias coding="cd Projects/WorkingStuff/Coding"
# 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 red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
#export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/Users/ChristophR/.rvm/bin
#export PATH=$PATH:/usr/local/bin:/usr/local/sbin:$PATH
export PATH=$PATH:/usr/local/bin$PATH:/usr/local/sbin:$PATH
# Running MacVim From Terminal
function mvim { /Applications/MacVim.app/Contents/MacOS/Vim -g $*; }
# Tab Info Paul Irish
function set_title_tab {
function settab {
if [[ $TERM_PROGRAM == iTerm.app && -z "$KONSOLE_DCOP_SESSION" ]];then
tab_label="$PWD:h:t/$PWD:t"
rlength="20"
echo -ne "\e]1;${(l:rlength:)tab_label}\a"
else
tab_label="$PWD:h:t/$PWD:t"
rlength="20"
if [[ -n "$KONSOLE_DCOP_SESSION" && ( -x $(which dcop) ) ]];then
dcop "$KONSOLE_DCOP_SESSION" renameSession "${(l:rlength:)tab_label}"
else
: # do nothing if tabs don't exist
fi
fi
}
function settitle {
title_lab=$PWD
echo -ne "\e]2;$title_lab\a"
}
function title_tab_chpwd { settab ; settitle }
title_tab_chpwd
if [[ "$TERM_PROGRAM" == "iTerm.app" ]];then
function title_tab_preexec { echo -ne "\e]1; $(history $HISTCMD | cut -b7- ) \a" }
function title_tab_precmd { settab }
else
function title_tab_preexec { echo -ne "\e]2; $(history $HISTCMD | cut -b7- ) \a" }
function title_tab_precmd { settitle }
fi
typeset -ga preexec_functions
preexec_functions+=title_tab_preexec
typeset -ga precmd_functions
precmd_functions+=title_tab_precmd
typeset -ga chpwd_functions
chpwd_functions+=title_tab_chpwd
}
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
echo '○'
}
function battery_charge {
echo `$BAT_CHARGE` 2>/dev/null
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function hg_prompt_info {
hg prompt --angle-brackets "\
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
}
PROMPT='
%{$fg[magenta]%}%n%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
$(virtualenv_info)$(prompt_char)$(set_title_tab) '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
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=""
#aliases
alias la='ls -A'
alias desk='cd ~/Desktop'
alias crtemplates='cd ~/Projects/Websites/christoph-rumpel.com/2013/development/templates/'
alias wpinstall='sh Projects/WorkingStuff/Shellscripts/wp.sh'
alias zshrc='subl ~/.zshrc'
alias mamp='/Applications/MAMP/htdocs'
alias mampcr='/Applications/MAMP/htdocs/wordpress/wp-content'
alias sshcr='ssh ssh-w005dcde@christoph-rumpel.com'
alias gitpom='git push origin master'
alias gitaddall='git add .'
alias project-ruby='cd ~/Projects/WorkingStuff/Coding/ruby'
alias stpackages='open ~/Library/Application\ Support/Sublime\ Text\ 2/Packages'
#WP-Cli
export WP_CLI_PHP=/Applications/MAMP/bin/php/php5.3.20/bin/php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment