From 4a813cf1a2ccddc58059271065a8abc8f9079019 Mon Sep 17 00:00:00 2001
From: Ryan Schmukler <rschmukler@gmail.com>
Date: Tue, 27 Dec 2011 21:02:31 -0600
Subject: [PATCH 01/11] Added vsplit_tab and split_tab for iTerm. Create new
 session within a vertical/horizontal split of the tab respectively.

---
 plugins/osx/osx.plugin.zsh | 63 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 60 insertions(+), 3 deletions(-)

diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index 682bb266..f278d4f8 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -2,10 +2,9 @@
 #          FILE:  osx.plugin.zsh
 #   DESCRIPTION:  oh-my-zsh plugin file.
 #        AUTHOR:  Sorin Ionescu (sorin.ionescu@gmail.com)
-#       VERSION:  1.0.1
+#       VERSION:  1.1.0
 # ------------------------------------------------------------------------------
 
-
 function tab() {
   local command="cd \\\"$PWD\\\""
   (( $# > 0 )) && command="${command}; $*"
@@ -35,7 +34,7 @@ EOF
           launch session "Default Session"
           set current_session to current session
           tell current_session
-            write text "${command}"
+            write text "${command}; clear;"
           end tell
         end tell
       end tell
@@ -43,6 +42,64 @@ EOF
   }
 }
 
+function vsplit_tab() {
+  local command="cd \\\"$PWD\\\""
+  (( $# > 0 )) && command="${command}; $*"
+
+  the_app=$(
+    osascript 2>/dev/null <<EOF
+      tell application "System Events"
+        name of first item of (every process whose frontmost is true)
+      end tell
+EOF
+  )
+
+  [[ "$the_app" == 'iTerm' ]] && {
+    osascript 2>/dev/null <<EOF
+      tell application "iTerm" to activate
+
+      tell application "System Events"
+        tell process "iTerm"
+          tell menu item "Split Vertically With Current Profile" of menu "Shell" of menu bar item "Shell" of menu bar 1
+            click
+          end tell
+        end tell
+        keystroke "${command}; clear;"
+        keystroke return
+      end tell
+EOF
+  }
+}
+
+function split_tab() {
+  local command="cd \\\"$PWD\\\""
+  (( $# > 0 )) && command="${command}; $*"
+
+  the_app=$(
+    osascript 2>/dev/null <<EOF
+      tell application "System Events"
+        name of first item of (every process whose frontmost is true)
+      end tell
+EOF
+  )
+
+  [[ "$the_app" == 'iTerm' ]] && {
+    osascript 2>/dev/null <<EOF
+      tell application "iTerm" to activate
+
+      tell application "System Events"
+        tell process "iTerm"
+          tell menu item "Split Horizontally With Current Profile" of menu "Shell" of menu bar item "Shell" of menu bar 1
+            click
+          end tell
+        end tell
+        keystroke "${command}; clear;"
+        keystroke return
+      end tell
+EOF
+  }
+}
+
 function pfd() {
   osascript 2>/dev/null <<EOF
     tell application "Finder"

From e3c34b4f9aee666ea5446a975b4a70cdbab3239c Mon Sep 17 00:00:00 2001
From: Mark Drago <markdrago@gmail.com>
Date: Sat, 31 Dec 2011 12:13:31 -0500
Subject: [PATCH 02/11] add ability to set custom prefix for cloud theme

---
 themes/cloud.zsh-theme | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme
index ad5e2834..4efbf977 100644
--- a/themes/cloud.zsh-theme
+++ b/themes/cloud.zsh-theme
@@ -1,4 +1,8 @@
-PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
+if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then
+    ZSH_THEME_CLOUD_PREFIX='☁'
+fi
+
+PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$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%}"

From 52733cb3bb0b1c85230c5c69e6c7231fb41c67fe Mon Sep 17 00:00:00 2001
From: Tadaya Tsuyukubo <ttsuyukubo@adconion.com>
Date: Thu, 26 Jan 2012 15:20:08 -0800
Subject: [PATCH 03/11] prompt git-remove as deleted

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

diff --git a/lib/git.zsh b/lib/git.zsh
index defa062c..9c89c366 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -54,6 +54,8 @@ git_prompt_status() {
   fi
   if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
     STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
+  elif $(echo "$INDEX" | grep '^D  ' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
   elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
     STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
   fi

From 8f89d4d5a5d584bae288d8111d83a6489a1369dc Mon Sep 17 00:00:00 2001
From: Darren Clark <djcdude@gmail.com>
Date: Fri, 27 Jan 2012 01:20:06 -0700
Subject: [PATCH 04/11] Fixed Mac OS X Terminal.app related issue with extra
 newlines being printed out sometimes

---
 lib/termsupport.zsh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
index 22198950..6601cbcb 100644
--- a/lib/termsupport.zsh
+++ b/lib/termsupport.zsh
@@ -6,6 +6,8 @@ function title {
   [ "$DISABLE_AUTO_TITLE" != "true" ] || return
   if [[ "$TERM" == screen* ]]; then
     print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
+  elif [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then
+    print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
   elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
     print -Pn "\e]2;$2:q\a" #set window name
     print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)

From 8088e8ac7935e9289d049278e117befd87f48809 Mon Sep 17 00:00:00 2001
From: Paul McKellar <paul.mckellar@gmail.com>
Date: Mon, 18 Jun 2012 01:01:05 -0700
Subject: [PATCH 05/11] add git remote branch autocomplete

---
 .../git-remote-branch.plugin.zsh               | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 plugins/git-remote-branch/git-remote-branch.plugin.zsh

diff --git a/plugins/git-remote-branch/git-remote-branch.plugin.zsh b/plugins/git-remote-branch/git-remote-branch.plugin.zsh
new file mode 100644
index 00000000..ff98cbf8
--- /dev/null
+++ b/plugins/git-remote-branch/git-remote-branch.plugin.zsh
@@ -0,0 +1,18 @@
+_git_remote_branch() {
+  ref=$(git symbolic-ref HEAD 2> /dev/null)
+  if [[ -n $ref ]]; then
+    if (( CURRENT == 2 )); then
+      # first arg: operation
+      compadd create publish rename delete track
+    elif (( CURRENT == 3 )); then
+      # second arg: remote branch name
+      compadd `git branch -r | grep -v HEAD | sed "s/.*\///" | sed "s/ //g"`
+    elif (( CURRENT == 4 )); then
+      # third arg: remote name
+      compadd `git remote`
+    fi
+  else;
+    _files
+  fi
+}
+compdef _git_remote_branch grb

From 8ba97c36443d8551a28de194a3da4b7c4d6c7949 Mon Sep 17 00:00:00 2001
From: Roey Darwish Dror <roey.ghost@gmail.com>
Date: Fri, 22 Jun 2012 15:30:51 +0300
Subject: [PATCH 06/11] Added history plugin

---
 plugins/history/history.plugin.zsh | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 plugins/history/history.plugin.zsh

diff --git a/plugins/history/history.plugin.zsh b/plugins/history/history.plugin.zsh
new file mode 100644
index 00000000..0f4aa4b1
--- /dev/null
+++ b/plugins/history/history.plugin.zsh
@@ -0,0 +1,8 @@
+alias h='history'
+
+function hs
+{
+    history | grep $*
+}
+
+alias hsi='hs -i'

From 62a436bb95144b00f0ef8ba8906a4044b4be4d9c Mon Sep 17 00:00:00 2001
From: Peter Mounce <pete@neverrunwithscissors.com>
Date: Fri, 22 Jun 2012 17:12:44 +0100
Subject: [PATCH 07/11] Fix mismatched quote in yum plugin

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

diff --git a/plugins/yum/yum.plugin.zsh b/plugins/yum/yum.plugin.zsh
index c9966f1b..69abfc4c 100644
--- a/plugins/yum/yum.plugin.zsh
+++ b/plugins/yum/yum.plugin.zsh
@@ -5,7 +5,7 @@ alias yp="yum info"                         # show package info
 alias yl="yum list"                         # list packages
 alias ygl="yum grouplist"                   # list package groups
 alias yli="yum list installed"              # print all installed packages
-alias ymc="yum makecache                    # rebuilds the yum package list
+alias ymc="yum makecache"                   # rebuilds the yum package list
 
 alias yu="sudo yum update"                  # upgrate packages
 alias yi="sudo yum install"                 # install package

From 73df0c8e93399c8281076d660aa48b1fc5203ce1 Mon Sep 17 00:00:00 2001
From: Dr Nic Williams <drnicwilliams@gmail.com>
Date: Wed, 2 May 2012 10:32:30 -0700
Subject: [PATCH 08/11] added 'gcl'for 'git config --list'; and gd for 'git
 diff'

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

diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index d3d3f702..c970b4cf 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -9,6 +9,7 @@ alias gup='git fetch && git rebase'
 compdef _git gup=git-fetch
 alias gp='git push'
 compdef _git gp=git-push
+alias gd='git diff'
 gdv() { git diff -w "$@" | view - }
 compdef _git gdv=git-diff
 alias gc='git commit -v'
@@ -24,6 +25,7 @@ alias gba='git branch -a'
 compdef _git gba=git-branch
 alias gcount='git shortlog -sn'
 compdef gcount=git
+alias gcl='git config --list'
 alias gcp='git cherry-pick'
 compdef _git gcp=git-cherry-pick
 alias glg='git log --stat --max-count=5'

From 61e708f91f36420e1c5ebe68c23d94738989c9d1 Mon Sep 17 00:00:00 2001
From: Graham Christensen <gchristensen@nationalfield.org>
Date: Mon, 23 Jul 2012 23:33:14 -0400
Subject: [PATCH 09/11] Adding a symfony plugin, for symfony 1

---
 plugins/symfony/symfony.plugin.zsh | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 plugins/symfony/symfony.plugin.zsh

diff --git a/plugins/symfony/symfony.plugin.zsh b/plugins/symfony/symfony.plugin.zsh
new file mode 100644
index 00000000..9de76754
--- /dev/null
+++ b/plugins/symfony/symfony.plugin.zsh
@@ -0,0 +1,13 @@
+# symfony basic command completion
+
+_symfony_get_command_list () {
+    ./symfony | sed "1,/Available tasks/d" | awk 'BEGIN { cat=null; } /^[A-Za-z]+$/ { cat = $1; } /^  :[a-z]+/ { print cat $1; }'
+}
+
+_symfony () {
+  if [ -f symfony ]; then
+    compadd `_symfony_get_command_list`
+  fi
+}
+
+compdef _symfony symfony

From a3c2a2f6e8ff9db508070a905de056346386ef4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caio=20Rom=C3=A3o?= <caioromao@gmail.com>
Date: Sun, 29 Jul 2012 20:18:26 +0200
Subject: [PATCH 10/11] Add branch status support to git_prompt_status
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This patch makes git_prompt_status support three new status variables:

 - ZSH_THEME_GIT_PROMPT_AHEAD
 - ZSH_THEME_GIT_PROMPT_BEHIND
 - ZSH_THEME_GIT_PROMPT_DIVERGED

With these extra variables it's easy to see (1) if you have commits in
your local branch that weren't pushed to the remote (AHEAD), (2) if
there are commits in the remote that you haven't merged/rebased yet
(BEHIND) or (3) if you have local unpushed commits AND the remote has
some commits you haven't merged yet (DIVERGED).

Refer to the first line displayed on `git status -b --porcelain`.

An example setup in a .zsh-theme file would be:

ZSH_THEME_GIT_PROMPT_AHEAD="↑"
ZSH_THEME_GIT_PROMPT_BEHIND="↓"
ZSH_THEME_GIT_PROMPT_DIVERGED="↕"
---
 lib/git.zsh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/git.zsh b/lib/git.zsh
index fb4ad8ca..bca8bdc9 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -38,7 +38,7 @@ function git_prompt_long_sha() {
 
 # Get the status of the working tree
 git_prompt_status() {
-  INDEX=$(git status --porcelain 2> /dev/null)
+  INDEX=$(git status --porcelain -b 2> /dev/null)
   STATUS=""
   if $(echo "$INDEX" | grep '^?? ' &> /dev/null); then
     STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
@@ -66,6 +66,15 @@ git_prompt_status() {
   if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
     STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
   fi
+  if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS"
+  fi
+  if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then
+    STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS"
+  fi
   echo $STATUS
 }
 

From 9172b3a89fb77f79043d185d247a501b3b93fa6f Mon Sep 17 00:00:00 2001
From: Yannik Stein <yannikstein@gmail.com>
Date: Sun, 5 Aug 2012 22:51:11 +0300
Subject: [PATCH 11/11] fix typo in cd-wrapper

---
 lib/directories.zsh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/directories.zsh b/lib/directories.zsh
index a787db9e..1b92df6b 100644
--- a/lib/directories.zsh
+++ b/lib/directories.zsh
@@ -26,9 +26,9 @@ cd () {
   elif [[ "x$*" == "x...." ]]; then
     cd ../../..
   elif [[ "x$*" == "x....." ]]; then
-    cd ../../..
-  elif [[ "x$*" == "x......" ]]; then
     cd ../../../..
+  elif [[ "x$*" == "x......" ]]; then
+    cd ../../../../..
   else
     builtin cd "$@"
   fi