1a6d11dbae97d5d85129a550ec4aaba070d247e0

Author
Peter Tillemans <pti@snamellit.com>
Committer
Peter Tillemans <pti@snamellit.com>
Date

Message

Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
  2index 1ca48089e17848c3fadaa76b23566b801bd19e24..39b76ecdf9d8af6221430461b99c545bae2a804f 100644
  3--- a/plugins/bundler/bundler.plugin.zsh
  4+++ b/plugins/bundler/bundler.plugin.zsh
  5@@ -6,7 +6,7 @@ alias bu="bundle update"
  6 
  7 # The following is based on https://github.com/gma/bundler-exec
  8 
  9-bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails)
 10+bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails)
 11 
 12 ## Functions
 13 
 14diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh
 15new file mode 100644
 16index 0000000000000000000000000000000000000000..d42584f1a49b6236f2104fd8e54837e678a10a01
 17--- /dev/null
 18+++ b/plugins/fasd/fasd.plugin.zsh
 19@@ -0,0 +1,6 @@
 20+if [ $commands[fasd] ]; then # check if fasd is installed
 21+  eval "$(fasd --init auto)"
 22+  alias v='f -e vim'
 23+  alias o='a -e open'
 24+fi
 25+
 26diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh
 27index e455527e7617fb356c9e73dc5271f7c75bb71ff6..697f98d664f92b71ab9bed127cda0e42e5726d7c 100644
 28--- a/plugins/lol/lol.plugin.zsh
 29+++ b/plugins/lol/lol.plugin.zsh
 30@@ -29,7 +29,7 @@ alias iminurbase='finger'
 31 alias btw='nice'
 32 alias obtw='nohup'
 33 
 34-alias nomz='ps -aux'
 35+alias nomz='ps aux'
 36 alias nomnom='killall'
 37 
 38 alias byes='exit'
 39diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
 40index a62dd560209e7a63b782e3043e4300bbbd07a252..d855c244552ebd6e2b418108c0d3cce1f8fa7202 100644
 41--- a/plugins/rbenv/rbenv.plugin.zsh
 42+++ b/plugins/rbenv/rbenv.plugin.zsh
 43@@ -17,7 +17,7 @@ for rbenvdir in "${rbenvdirs[@]}" ; do
 44     FOUND_RBENV=1
 45     export RBENV_ROOT=$rbenvdir
 46     export PATH=${rbenvdir}/bin:$PATH
 47-    eval "$(rbenv init -)"
 48+    eval "$(rbenv init - zsh)"
 49 
 50     alias rubies="rbenv versions"
 51     alias gemsets="rbenv gemset list"
 52diff --git a/plugins/rbfu/rbfu.plugin.zsh b/plugins/rbfu/rbfu.plugin.zsh
 53new file mode 100644
 54index 0000000000000000000000000000000000000000..0084852054d3c78856b24187a2e485d02b5e04c8
 55--- /dev/null
 56+++ b/plugins/rbfu/rbfu.plugin.zsh
 57@@ -0,0 +1,42 @@
 58+# Enables rbfu with --auto option, if available.
 59+#
 60+# Also provides a command to list all installed/available
 61+# rubies. To ensure compatibility with themes, creates the
 62+# rvm_prompt_info function to return the $RBFU_RUBY_VERSION
 63+# version.
 64+
 65+command -v rbfu &>/dev/null
 66+
 67+if [[ $? -eq 0 ]]; then
 68+  eval "$(rbfu --init --auto)"
 69+
 70+  # Internal: Print ruby version details, if it's currently
 71+  # active etc.
 72+  function _rbfu_rubies_print() {
 73+    local rb rb_out
 74+    rb=$(basename $1)
 75+    rb_out="$rb"
 76+    [[ -h $1 ]] && rb_out="$rb_out${fg[green]}@${reset_color}"
 77+    [[ "x$rb" == "x$2" ]] && rb_out="${fg[red]}$rb_out ${fg[red]}*${reset_color}"
 78+    echo $rb_out
 79+  }
 80+
 81+  # Public: Provide a list with all available rubies, this basically depends
 82+  # on `ls -1` and .rfbu/rubies. Highlights the currently active ruby version
 83+  # and aliases.
 84+  function rbfu-rubies() {
 85+    local rbfu_dir active_rb
 86+    rbfu_dir=$RBFU_RUBIES
 87+    active_rb=$RBFU_RUBY_VERSION
 88+    [[ -z "$rbfu_dir" ]] && rbfu_dir="${HOME}/.rbfu/rubies"
 89+    [[ -z "$active_rb" ]] && active_rb="system"
 90+    _rbfu_rubies_print "${rbfu_dir}/system" $active_rb
 91+    for rb in $(ls -1 $rbfu_dir); do
 92+      _rbfu_rubies_print "${rbfu_dir}/${rb}" $active_rb
 93+    done
 94+  }
 95+
 96+  # Public: Create rvm_prompt_info command for themes compatibility, unless
 97+  # it has already been defined.
 98+  [ ! -x rvm_prompt_info ] && function rvm_prompt_info() { echo "${RBFU_RUBY_VERSION:=system}" }
 99+fi
100diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
101old mode 100644
102new mode 100755
103index c42c68df1d2b1a759dd618a18d75ce2d3685856a..91b0279c565cf503ce159fa9e55c0353df37f63e
104--- a/plugins/sublime/sublime.plugin.zsh
105+++ b/plugins/sublime/sublime.plugin.zsh
106@@ -1,3 +1,9 @@
107 # Sublime Text 2 Aliases
108-alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
109+#unamestr = 'uname'
110+
111+if [[ $('uname') == 'Linux' ]]; then
112+	alias st='/usr/bin/sublime_text&'
113+elif  [[ $('uname') == 'Darwin' ]]; then
114+	alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
115+fi
116 alias stt='st .'
117diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
118index a93c8e8633351f5e31904d2c3d681043ced94739..5d0860400a0d83bd98912a7bd1a7470f6031a5b8 100644
119--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
120+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
121@@ -1,5 +1,5 @@
122 WRAPPER_FOUND=0
123-for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/virtualenvwrapper" ; do
124+for wrapsource in "/usr/bin/virtualenvwrapper.sh" "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/virtualenvwrapper" ; do
125   if [[ -e $wrapsource ]] ; then
126     WRAPPER_FOUND=1
127     source $wrapsource
128diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
129new file mode 100644
130index 0000000000000000000000000000000000000000..c1b00c62bf6ec6889cd0f88c41321b4aabf971a8
131--- /dev/null
132+++ b/themes/af-magic.zsh-theme
133@@ -0,0 +1,36 @@
134+# af-magic.zsh-theme
135+#
136+# Author: Andy Fleming
137+# URL: http://andyfleming.com/
138+# Repo: https://github.com/andyfleming/oh-my-zsh
139+# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
140+#
141+# Created on:		June 19, 2012
142+# Last modified on:	June 20, 2012
143+
144+
145+
146+if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
147+local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
148+
149+# primary prompt
150+PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%}
151+$FG[032]%~\
152+$(git_prompt_info) \
153+$FG[105]%(!.#.»)%{$reset_color%} '
154+PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
155+RPS1='${return_code}'
156+
157+
158+# color vars
159+eval my_gray='$FG[237]'
160+eval my_orange='$FG[214]'
161+
162+# right prompt
163+RPROMPT='$my_gray%n@%m%{$reset_color%}%'
164+
165+# git settings
166+ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:"
167+ZSH_THEME_GIT_PROMPT_CLEAN=""
168+ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
169+ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
170diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme
171new file mode 100644
172index 0000000000000000000000000000000000000000..22c7a09811e2efeb6b68dc1441f411f46c3c84c8
173--- /dev/null
174+++ b/themes/fino-time.zsh-theme
175@@ -0,0 +1,39 @@
176+# Fino-time theme by Aexander Berezovsky (http://berezovsky.me) based on Fino by Max Masnick (http://max.masnick.me)
177+
178+# Use with a dark background and 256-color terminal!
179+# Meant for people with RVM and git. Tested only on OS X 10.7.
180+
181+# You can set your computer name in the ~/.box-name file if you want.
182+
183+# Borrowing shamelessly from these oh-my-zsh themes:
184+#   bira
185+#   robbyrussell
186+#
187+# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
188+
189+function virtualenv_info {
190+    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
191+}
192+
193+function prompt_char {
194+    git branch >/dev/null 2>/dev/null && echo '±' && return
195+    echo '○'
196+}
197+
198+function box_name {
199+    [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
200+}
201+
202+
203+local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}'
204+local current_dir='${PWD/#$HOME/~}'
205+local git_info='$(git_prompt_info)'
206+
207+
208diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
209index bbd705a1e8de80152e3577f1e3bd854b58e2185d..612901cbe5e122b8a3ac0ebe3b5e72b4c3948b58 100644
210--- a/tools/check_for_upgrade.sh
211+++ b/tools/check_for_upgrade.sh
212@@ -32,9 +32,10 @@ then
213       echo "[Oh My Zsh] Would you like to check for updates?"
214       echo "Type Y to update oh-my-zsh: \c"
215       read line
216-      if [ "$line" = Y ] || [ "$line" = y ]
217-      then
218+      if [ "$line" = Y ] || [ "$line" = y ]; then
219         _upgrade_zsh
220+      else
221+        _update_zsh_update
222       fi
223     fi
224   fi