From d53d0eac070b270222c042c2e187dcf3a109b39a Mon Sep 17 00:00:00 2001
From: Phillip Ridlen <phillip@balcomagency.com>
Date: Tue, 5 Oct 2010 17:06:08 -0500
Subject: [PATCH 01/13] Add cloud.zsh-theme

---
 themes/cloud.zsh-theme | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 themes/cloud.zsh-theme

diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme
new file mode 100644
index 000000000..ad5e2834b
--- /dev/null
+++ b/themes/cloud.zsh-theme
@@ -0,0 +1,6 @@
+PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
\ No newline at end of file

From 8059c0727a09257dc387aa9ba17dc99d1842aa19 Mon Sep 17 00:00:00 2001
From: Irakli Gozalishvili <rfobic@gmail.com>
Date: Sat, 9 Oct 2010 01:27:40 +0200
Subject: [PATCH 02/13] Improving git plugin so it can display much more data.

---
 lib/git.zsh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/lib/git.zsh b/lib/git.zsh
index 889dd98df..57a78e27f 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -11,3 +11,31 @@ parse_git_dirty () {
     echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
   fi
 }
+
+# get the status of the working tree
+git_prompt_status() {
+  INDEX=$(git status --porcelain 2> /dev/null)
+  STATUS=""
+  if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^A  ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
+  elif $(echo "$INDEX" | grep '^M  ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^R  ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
+  fi
+  echo $STATUS
+}
+

From b6dde1e8cfb938e507e5e8db9eac99d28a020468 Mon Sep 17 00:00:00 2001
From: Irakli Gozalishvili <rfobic@gmail.com>
Date: Sat, 9 Oct 2010 01:49:35 +0200
Subject: [PATCH 03/13] Adding new gozilla theme

---
 themes/gozilla.zsh-theme | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 themes/gozilla.zsh-theme

diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme
new file mode 100644
index 000000000..3112b3670
--- /dev/null
+++ b/themes/gozilla.zsh-theme
@@ -0,0 +1,15 @@
+PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
+RPROMPT='$(git_prompt_status)'
+
+ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}"
+
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}"
+

From deb0f7478b292b48338bc4d6098b8f6b013d0b4b Mon Sep 17 00:00:00 2001
From: Irakli Gozalishvili <rfobic@gmail.com>
Date: Sat, 9 Oct 2010 02:16:10 +0200
Subject: [PATCH 04/13] Fixing some minor redrew issue

---
 themes/gozilla.zsh-theme | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme
index 3112b3670..97566e380 100644
--- a/themes/gozilla.zsh-theme
+++ b/themes/gozilla.zsh-theme
@@ -1,8 +1,12 @@
-PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
-RPROMPT='$(git_prompt_status)'
+PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
 
 ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}"
 ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
+
+RPROMPT='$(git_prompt_status)'
+
 ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}"
 ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}"
 ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}"
@@ -10,6 +14,3 @@ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}"
 ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}"
 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}"
 
-ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}"
-

From aab235f6121a93b81a425d522a0c7f2aaac946bd Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.org>
Date: Fri, 8 Oct 2010 22:44:42 -0700
Subject: [PATCH 05/13] functions: fix title() to not match any $TERM

On my linux virtual terminals, where TERM="linux", I was getting
annoying output that was messing up my prompt.

It turns out the title function was always matching on the elif
statement for xterm/rxvt no matter what and the linux vt doesn't know
what to do with the title special control sequence and thus was printing
out garbage.

Through experimentation I figured out that the || inside of the [[ ]]
did not work:

export TERM=linux
$ if [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then echo $TERM; fi
linux

$ if [[ $TERM =~ "^xterm" ]] || [[ $TERM == "rxvt" ]]; then echo $TERM; fi

Signed-off-by: Brandon Philips <brandon@ifup.org>

openSUSE running zsh 4.3.10
---
 lib/functions.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/functions.zsh b/lib/functions.zsh
index 561586cba..e494f1f4d 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -5,7 +5,7 @@ function title {
     print -nR $'\033k'$1$'\033'\\\
 
     print -nR $'\033]0;'$2$'\a'
-  elif [[ $TERM =~ "^xterm" || $TERM == "rxvt" ]]; then
+  elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]]; then
     # Use this one instead for XTerms:
     print -nR $'\033]0;'$*$'\a'
   fi

From df1e305736f23d8702a4d68b0fb8fc502e8c442a Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.org>
Date: Fri, 8 Oct 2010 22:57:43 -0700
Subject: [PATCH 06/13] themes: add philips theme

Theme based on clean that is more suitable for white background
terminals.

Signed-off-by: Brandon Philips <brandon@ifup.org>
---
 themes/philips.zsh-theme | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 themes/philips.zsh-theme

diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme
new file mode 100644
index 000000000..fa7c59035
--- /dev/null
+++ b/themes/philips.zsh-theme
@@ -0,0 +1,14 @@
+if [ "$(whoami)" = "root" ]; then NCOLOR="red"; else NCOLOR="green"; fi
+
+PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) '
+RPROMPT='[%*]'
+
+# git theming
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_CLEAN=""
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}"
+
+# LS colors, made with http://geoff.greer.fm/lscolors/
+export LSCOLORS="Gxfxcxdxbxegedabagacad"
+export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'

From 249fe1471cde3b12366729e5a869dd56c26b07ce Mon Sep 17 00:00:00 2001
From: Sven Lito <me@svenlito.com>
Date: Sat, 9 Oct 2010 14:29:24 +0100
Subject: [PATCH 07/13] adding github plugin

---
 plugins/github/_github           | 39 ++++++++++++++++++++++++++++++++
 plugins/github/github.plugin.zsh |  4 ++++
 2 files changed, 43 insertions(+)
 create mode 100644 plugins/github/_github
 create mode 100644 plugins/github/github.plugin.zsh

diff --git a/plugins/github/_github b/plugins/github/_github
new file mode 100644
index 000000000..5295081e5
--- /dev/null
+++ b/plugins/github/_github
@@ -0,0 +1,39 @@
+#compdef github
+#autoload
+
+# github zsh completion, based on homebrew completion
+
+local -a _1st_arguments
+_1st_arguments=(
+  'browse:Open this repo in a web browser'
+  'clone:Clone a repo'
+  'config:Automatically set configuration info, or pass args to specify'
+  'create-from-local:Create a new GitHub repository from the current local repository'
+  'create:Create a new empty GitHub repository'
+  'fetch:Fetch from a remote to a local branch'
+  'fetch_all:Fetch all refs from a user'
+  'fork:Forks a GitHub repository'
+  'home:Open this repos master branch in a web browser'
+  'ignore:Ignore a SHA from github network commits'
+  'info:Info about this project'
+  'issues:Project issues tools'
+  'network:Project network tools - sub-commands : web [user], list, fetch, commits'
+  'network --after:Only show commits after a certain date'
+  'network --applies:Filter commits to patches that apply cleanly'
+  'open:Open the given user/project in a web browser'
+  'pull-request:Generate the text for a pull request'
+  'pull:Pull from a remote'
+  'search:Search GitHub for the given repository name'
+  'track:Track another users repository'
+)
+
+local expl
+local -a pkgs installed_pkgs
+
+_arguments \
+  '*:: :->subcmds' && return 0
+
+if (( CURRENT == 1 )); then
+  _describe -t commands "github subcommand" _1st_arguments
+  return
+fi
diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
new file mode 100644
index 000000000..c23504b85
--- /dev/null
+++ b/plugins/github/github.plugin.zsh
@@ -0,0 +1,4 @@
+# add github completion function to path
+fpath=($ZSH/plugins/github $fpath)
+autoload -U compinit
+compinit -i

From dfbed8fd9894ec4b13745e9e08233a750c2369ee Mon Sep 17 00:00:00 2001
From: Sven Lito <me@svenlito.com>
Date: Sat, 9 Oct 2010 15:03:08 +0100
Subject: [PATCH 08/13] added git log incl. stats for the past 5 commits

---
 plugins/git/git.plugin.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 655eaf728..d317d179d 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -12,7 +12,7 @@ alias gb='git branch'
 alias gba='git branch -a'
 alias gcount='git shortlog -sn'
 alias gcp='git cherry-pick'
-
+alias glg='git log --stat --max-count=5'
 
 # Git and svn mix
 alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'

From fcd88edfb3464e46d3337c3ee72d28248e92ac79 Mon Sep 17 00:00:00 2001
From: Sven Lito <me@svenlito.com>
Date: Sat, 9 Oct 2010 15:18:35 +0100
Subject: [PATCH 09/13] adding comment and URL to github gem

---
 plugins/github/_github | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/plugins/github/_github b/plugins/github/_github
index 5295081e5..72178946a 100644
--- a/plugins/github/_github
+++ b/plugins/github/_github
@@ -1,3 +1,6 @@
+# in order to make this work, you would need to have the github gem installed
+# http://github.com/defunkt/github-gem
+
 #compdef github
 #autoload
 

From 210c76c35b1db7a761df45cd7f85d3b324f8e0b5 Mon Sep 17 00:00:00 2001
From: Sven Lito <me@svenlito.com>
Date: Sat, 9 Oct 2010 15:29:28 +0100
Subject: [PATCH 10/13] leaving out subcommands for now

---
 plugins/github/_github | 2 --
 1 file changed, 2 deletions(-)

diff --git a/plugins/github/_github b/plugins/github/_github
index 72178946a..b8e1a9ada 100644
--- a/plugins/github/_github
+++ b/plugins/github/_github
@@ -21,8 +21,6 @@ _1st_arguments=(
   'info:Info about this project'
   'issues:Project issues tools'
   'network:Project network tools - sub-commands : web [user], list, fetch, commits'
-  'network --after:Only show commits after a certain date'
-  'network --applies:Filter commits to patches that apply cleanly'
   'open:Open the given user/project in a web browser'
   'pull-request:Generate the text for a pull request'
   'pull:Pull from a remote'

From 061ea5c7c98ada295ae4623692e6811c0baab88d Mon Sep 17 00:00:00 2001
From: Irakli Gozalishvili <rfobic@gmail.com>
Date: Sat, 9 Oct 2010 18:06:00 +0200
Subject: [PATCH 11/13] changeing unicode characters that were causing issues

---
 themes/gozilla.zsh-theme | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/themes/gozilla.zsh-theme b/themes/gozilla.zsh-theme
index 97566e380..c6b752e9b 100644
--- a/themes/gozilla.zsh-theme
+++ b/themes/gozilla.zsh-theme
@@ -1,16 +1,15 @@
 PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
 
-ZSH_THEME_GIT_PROMPT_PREFIX="(%{%}"
-ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}"
-ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
+ZSH_THEME_GIT_PROMPT_PREFIX="("
+ZSH_THEME_GIT_PROMPT_SUFFIX=")"
+ZSH_THEME_GIT_PROMPT_DIRTY=""
+ZSH_THEME_GIT_PROMPT_CLEAN=""
 
-RPROMPT='$(git_prompt_status)'
-
-ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ⚡%{$reset_color%}"
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ⚑%{$reset_color%}"
+RPROMPT='$(git_prompt_status)%{$reset_color%}'
 
+ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
+ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
+ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗"
+ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦"
+ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱"

From 425b0ef89fcd40b6b235347e32d8efd44709a802 Mon Sep 17 00:00:00 2001
From: Sven Lito <me@svenlito.com>
Date: Sat, 9 Oct 2010 18:38:01 +0100
Subject: [PATCH 12/13] bugfix - moved gem info

---
 plugins/github/_github | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/github/_github b/plugins/github/_github
index b8e1a9ada..83e1713c7 100644
--- a/plugins/github/_github
+++ b/plugins/github/_github
@@ -1,9 +1,9 @@
-# in order to make this work, you would need to have the github gem installed
-# http://github.com/defunkt/github-gem
-
 #compdef github
 #autoload
 
+# in order to make this work, you will need to have the github gem installed
+# http://github.com/defunkt/github-gem
+
 # github zsh completion, based on homebrew completion
 
 local -a _1st_arguments

From dc12853b0c3e5af9e42f44cb9efdf57d44d20711 Mon Sep 17 00:00:00 2001
From: Sven Lito <me@svenlito.com>
Date: Sat, 9 Oct 2010 19:11:07 +0100
Subject: [PATCH 13/13] merging in changes from robby's repo

---
 lib/functions.zsh | 1 -
 lib/git.zsh       | 1 -
 2 files changed, 2 deletions(-)

diff --git a/lib/functions.zsh b/lib/functions.zsh
index e494f1f4d..e3c0de43e 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -37,4 +37,3 @@ function take() {
   mkdir -p $1
   cd $1
 }
-
diff --git a/lib/git.zsh b/lib/git.zsh
index 57a78e27f..75fdc1f9c 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -38,4 +38,3 @@ git_prompt_status() {
   fi
   echo $STATUS
 }
-