c8ac3356c8da5ba0290066309b0fcd16d223f187
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/lib/completion.zsh b/lib/completion.zsh
2index 9c2dfecca3cc82ee5f3b1231f11b7a9f75e2e3a4..fdd0a8536cd4825235d0f4fddd217f0f398ea86b 100644
3--- a/lib/completion.zsh
4+++ b/lib/completion.zsh
5@@ -8,9 +8,6 @@ setopt always_to_end
6
7 WORDCHARS=''
8
9-autoload -U compinit
10-compinit -i
11-
12 zmodload -i zsh/complist
13
14 ## case-insensitive (all),partial-word and then substring completion
15diff --git a/lib/git.zsh b/lib/git.zsh
16index 8512de8a40ba542e24d86be6e5c83c7245623875..e96f075beeb7efcfc23c6b7520bf7bc46e1e9430 100644
17--- a/lib/git.zsh
18+++ b/lib/git.zsh
19@@ -4,7 +4,8 @@ function git_prompt_info() {
20 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
21 }
22
23-parse_git_dirty () {
24+# Checks if working tree is dirty
25+parse_git_dirty() {
26 if [[ -n $(git status -s 2> /dev/null) ]]; then
27 echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
28 else
29@@ -12,7 +13,24 @@ parse_git_dirty () {
30 fi
31 }
32
33-# get the status of the working tree
34+# Checks if there are commits ahead from remote
35+function git_prompt_ahead() {
36+ if $(echo "$(git log origin/master..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
37+ echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
38+ fi
39+}
40+
41+# Formats prompt string for current git commit short SHA
42+function git_prompt_short_sha() {
43+ SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
44+}
45+
46+# Formats prompt string for current git commit long SHA
47+function git_prompt_long_sha() {
48+ SHA=$(git rev-parse HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
49+}
50+
51+# Get the status of the working tree
52 git_prompt_status() {
53 INDEX=$(git status --porcelain 2> /dev/null)
54 STATUS=""
55@@ -41,4 +59,4 @@ git_prompt_status() {
56 STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
57 fi
58 echo $STATUS
59-}
60+}
61diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh
62index 7196a88ffe3de7e8b1f4e8327ed58f050f8898b8..c7ad907d782d61c51f6e62bd03dbf960712285df 100644
63--- a/lib/key-bindings.zsh
64+++ b/lib/key-bindings.zsh
65@@ -1,6 +1,4 @@
66 # TODO: Explain what some of this does..
67-autoload -U compinit
68-compinit -i
69
70 bindkey -e
71 bindkey '\ew' kill-region
72diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
73index 1e735b058437841b83500f0e380f60bef7ae985b..3ea88e9248f70f58fed084b2c274548acb902b7d 100644
74--- a/oh-my-zsh.sh
75+++ b/oh-my-zsh.sh
76@@ -7,12 +7,23 @@ fpath=($ZSH/functions $fpath)
77 # TIP: Add files you don't want in git to .gitignore
78 for config_file ($ZSH/lib/*.zsh) source $config_file
79
80-# Load all of your custom configurations from custom/
81-for config_file ($ZSH/custom/*.zsh) source $config_file
82+# Add all defined plugins to fpath
83+plugin=${plugin:=()}
84+for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath)
85+
86+# Load and run compinit
87+autoload -U compinit
88+compinit -i
89
90 # Load all of the plugins that were defined in ~/.zshrc
91-plugin=${plugin:=()}
92-for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh
93+for plugin ($plugins); do
94+ if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
95+ source $ZSH/plugins/$plugin/$plugin.plugin.zsh
96+ fi
97+done
98+
99+# Load all of your custom configurations from custom/
100+for config_file ($ZSH/custom/*.zsh) source $config_file
101
102 # Load the theme
103 # Check for updates on initial load...
104diff --git a/plugins/brew/_brew b/plugins/brew/_brew
105index 4e590ac6302d0196a9b269798ea9f4ded913a05c..cee1e25f0bdbaae3808392f6bc678e22f653ec80 100644
106--- a/plugins/brew/_brew
107+++ b/plugins/brew/_brew
108@@ -31,6 +31,7 @@ _1st_arguments=(
109 'search:search for a formula (/regex/ or string)'
110 'unlink:unlink a formula'
111 'update:freshen up links'
112+ 'upgrade:upgrade outdated formulae'
113 'uses:show formulas which depend on a formula'
114 )
115
116diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh
117deleted file mode 100644
118index 353a18942ac594122f5bfc634fcef3f834d1c665..0000000000000000000000000000000000000000
119--- a/plugins/brew/brew.plugin.zsh
120+++ /dev/null
121@@ -1,4 +0,0 @@
122-# add brew completion function to path
123-fpath=($ZSH/plugins/brew $fpath)
124-autoload -U compinit
125-compinit -i
126diff --git a/plugins/cpanm/cpanm.plugin.zsh b/plugins/cpanm/cpanm.plugin.zsh
127deleted file mode 100644
128index af52d3e8b2567a2a61f9f41cae8f3b15e0d4b933..0000000000000000000000000000000000000000
129--- a/plugins/cpanm/cpanm.plugin.zsh
130+++ /dev/null
131@@ -1,4 +0,0 @@
132-# add cpanm completion function to path
133-fpath=($ZSH/plugins/cpanm $fpath)
134-autoload -U compinit
135-compinit -i
136diff --git a/plugins/deb/deb.plugin.zsh b/plugins/deb/deb.plugin.zsh
137index 732294a87d08858a8abb05248d19a27256680eca..1b35a064628625497cd67c2163c00d02a4c35cff 100644
138--- a/plugins/deb/deb.plugin.zsh
139+++ b/plugins/deb/deb.plugin.zsh
140@@ -9,4 +9,5 @@ alias ar="sudo apt-get remove --purge && \
141 sudo apt-get autoremove --purge" # remove package
142 alias ap="apt-cache policy" # apt policy
143 alias av="apt-cache show" # show package info
144+alias acs="apt-cache search" # search package
145 alias ac="sudo apt-get clean && sudo apt-get autoclean" # clean apt cache
146diff --git a/plugins/gem/gem.plugin.zsh b/plugins/gem/gem.plugin.zsh
147deleted file mode 100644
148index d4e5c6584a8289c6d4097cd2090fb71a48ef69c6..0000000000000000000000000000000000000000
149--- a/plugins/gem/gem.plugin.zsh
150+++ /dev/null
151@@ -1,4 +0,0 @@
152-# add gem completion function to path
153-fpath=($ZSH/plugins/gem $fpath)
154-autoload -U compinit
155-compinit -i
156diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
157index 8d45806545fa8110221c551c5e98dc7f2a9d48ec..df7053ba7c897eff67982911cc754a62eb3970e3 100644
158--- a/plugins/github/github.plugin.zsh
159+++ b/plugins/github/github.plugin.zsh
160@@ -5,7 +5,3 @@ if [ "$commands[(I)hub]" ]; then
161 function git(){hub "$@"}
162 fi
163
164-# add github completion function to path
165-fpath=($ZSH/plugins/github $fpath)
166-autoload -U compinit
167-compinit -i
168diff --git a/plugins/macports/macports.plugin.zsh b/plugins/macports/macports.plugin.zsh
169index cbbc4926596480a1567ae5b36e812412c3c901d3..277352e321afd49b954cb91223cf59f9eaf399a3 100644
170--- a/plugins/macports/macports.plugin.zsh
171+++ b/plugins/macports/macports.plugin.zsh
172@@ -6,7 +6,3 @@ alias puni="sudo port uninstall inactive"
173 alias puo="sudo port upgrade outdated"
174 alias pup="psu && puo"
175
176-# add macports completion function to path
177-fpath=($ZSH/plugins/macports $fpath)
178-autoload -U compinit
179-compinit -i
180diff --git a/plugins/mysql-macports/mysql-macports.plugin.zsh b/plugins/mysql-macports/mysql-macports.plugin.zsh
181new file mode 100644
182index 0000000000000000000000000000000000000000..c39563fe49c0cbc81dd7eb9ca8feeb5bc54a3da0
183--- /dev/null
184+++ b/plugins/mysql-macports/mysql-macports.plugin.zsh
185@@ -0,0 +1,8 @@
186+# commands to control local mysql-server installation
187+# paths are for osx installation via macports
188+
189+alias mysqlstart='sudo /opt/local/share/mysql5/mysql/mysql.server start'
190+alias mysqlstop='sudo /opt/local/share/mysql5/mysql/mysql.server stop'
191+alias mysqlrestart='sudo /opt/local/share/mysql5/mysql/mysql.server restart'
192+
193+alias mysqlstatus='mysqladmin5 -u root -p ping'
194diff --git a/plugins/mysql/mysql-macports.plugin.zsh b/plugins/mysql/mysql-macports.plugin.zsh
195deleted file mode 100644
196index 63b881c9f5b74f8f11770b20fe40749add1f23ae..0000000000000000000000000000000000000000
197--- a/plugins/mysql/mysql-macports.plugin.zsh
198+++ /dev/null
199@@ -1,6 +0,0 @@
200-# commands to control local mysql-server installation
201-# paths are for osx installtion via macports
202-
203-alias mysqlstart='sudo /opt/local/bin/mysqld_safe5'
204-alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown'
205-alias mysqlstatus='mysqladmin5 -u root -p ping'
206diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh
207deleted file mode 100644
208index 826f0f7b00b89019e562bf21e178d7d5dcd53a63..0000000000000000000000000000000000000000
209--- a/plugins/npm/npm.plugin.zsh
210+++ /dev/null
211@@ -1,4 +0,0 @@
212-# add npm completion function to path
213-fpath=($ZSH/plugins/npm $fpath)
214-autoload -U compinit
215-compinit -i
216diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh
217deleted file mode 100644
218index bf9f2396885713e6eb409342090be6c9790e3171..0000000000000000000000000000000000000000
219--- a/plugins/pip/pip.plugin.zsh
220+++ /dev/null
221@@ -1,4 +0,0 @@
222-# add brew completion function to path
223-fpath=($ZSH/plugins/pip $fpath)
224-autoload -U compinit
225-compinit -i
226diff --git a/plugins/redis-cli/_redis-cli b/plugins/redis-cli/_redis-cli
227new file mode 100644
228index 0000000000000000000000000000000000000000..3789add182d2dd0283cf54ccece4f59a04513ac1
229--- /dev/null
230+++ b/plugins/redis-cli/_redis-cli
231@@ -0,0 +1,142 @@
232+#compdef redis-cli rec
233+#autoload
234+
235+#redis cli completion, based off homebrew completion (ref. 2011-04-14)
236+
237+local -a _1st_arguments
238+_1st_arguments=(
239+ 'append:append a value to a key'
240+ 'auth:authenticate to the server'
241+ 'bgrewriteeaof:asynchronously rewrite the append-only file'
242+ 'bgsave:asynchornously save the dataset to disk'
243+ 'blpop:remove and get the first element in a list, or block until one is available'
244+ 'brpop:remove and get the last element in a list, or block until one is available'
245+ 'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available'
246+ # 'config get:get the value of a configuration parameter'
247+ # 'config set:set a configuration parameter to the given value'
248+ # 'config resetstat: reset the stats returned by INFO'
249+ 'dbsize:return the number of keys in the selected database'
250+ # 'debug object:get debugging information about a key'
251+ # 'debug setgfault:make the server crash'
252+ 'decr:decrement the integer value of a key by one'
253+ 'decrby:decrement the integet value of a key by the given number'
254+ 'del:delete a key'
255+ 'discard:discard all commands issued after MULTI'
256+ 'echo:echo the given string'
257+ 'exec:execute all commands issued after a MULTI'
258+ 'exists:determine if a key exists'
259+ 'expire:set the time to live for a key, in seconds'
260+ 'expireat:set the expiration for a key as a UNIX timestamp'
261+ 'flushall:remove all keys from all databases'
262+ 'flushdb:remove all keys from the current database'
263+ 'get:get the value of a key'
264+ 'getbit:returns the bit value at offset in the string value stored at key'
265+ 'getrange:get a substring of the string stored at a key'
266+ 'getset:set the string value of a key and return its old value'
267+ 'hdel:delete a hash field'
268+ 'hexists:determine if a hash field exists'
269+ 'hget:get the value of a hash field'
270+ 'hgetall:get all the fields and values in a hash'
271+ 'hincrby:increment the integer value of a hash field by the given number'
272+ 'hkeys:get all the fields in a hash'
273+ 'hlen:get the number of fields in a hash'
274+ 'hmget:get the values of all the given hash fields'
275+ 'hmset:set multiple hash fields to multiple values'
276+ 'hset:set the string value of a hash field'
277+ 'hsetnx:set the value of a hash field, only if the field does not exist'
278+ 'hvals:get all the values in a hash'
279+ 'incr:increment the integer value of a key by one'
280+ 'incrby:increment the integer value of a key by the given number'
281+ 'info:get information and statistics about the server'
282+ 'keys:find all keys matching the given pattern'
283+ 'lastsave:get the UNIX timestamp of the last successful save to disk'
284+ 'lindex:get an element from a list by its index'
285+ 'linset:insert an element before or after another element in a list'
286+ 'llen:get the length of a list'
287+ 'lpop:remove and get the first element in a list'
288+ 'lpush:prepend a value to a list'
289+ 'lpushx:prepend a value to a list, only if the list exists'
290+ 'lrange:get a range of elements from a list'
291+ 'lrem:remove elements from a list'
292+ 'lset:set the value of an element in a list by its index'
293+ 'ltrim:trim a list to the specified range'
294+ 'mget:get the values of all the given keys'
295+ 'monitor:listen for all requests received by the server in real time'
296+ 'move:move a key to another database'
297+ 'mset:set multiple keys to muliple values'
298+ 'msetnx:set multiple keys tom ultiple values, only if none of the keys exist'
299+ 'multi:mark the start of a transaction block'
300+ 'object:inspect the internals of Redis objects'
301+ 'persist:remove the expiration from a key'
302+ 'ping:ping the server'
303+ 'psubscribe:listen for messages published to channels matching the given patterns'
304+ 'publish:post a message to a channel'
305+ 'punsubscribe:stop listening for messages posted to channels matching the given patterns'
306+ 'quit:close the connection'
307+ 'randomkey:return a random key from the keyspace'
308+ 'rename:rename a key'
309+ 'renamenx:rename a key, only if the new key does not exist'
310+ 'rpop:remove and get the last element in a list'
311+ 'rpoplpush:remove the last element in a list, append it to another list and return it'
312+ 'rpush:append a value to a list'
313+ 'rpushx:append a value to a list, only if the list exists'
314+ 'sadd:add a member to a set'
315+ 'save:synchronously save the dataset to disk'
316+ 'scard:get the number of members in a set'
317+ 'sdiff:subtract multiple sets'
318+ 'sdiffstore:subtract multiple sets and store the resulting set in a key'
319+ 'select:change the selected database for the current connection'
320+ 'set:set the string value of a key'
321+ 'setbit:sets or clears the bit at offset in the string value stored at key'
322+ 'setex:set the value and expiration of a key'
323+ 'setnx:set the value of a key, only if the key does not exist'
324+ 'setrange:overwrite part of a string at key starting at the specified offset'
325+ 'shutdown:synchronously save the dataset to disk and then shut down the server'
326+ 'sinter:intersect multiple sets'
327+ 'sinterstore:intersect multiple sets and store the resulting set in a key'
328+ 'sismember:determine if a given value is a member of a set'
329+ 'slaveof:make the server a slave of another instance, or promote it as master'
330+ 'smembers:get all the members in a set'
331diff --git a/plugins/vagrant/vagrant.plugin.zsh b/plugins/vagrant/vagrant.plugin.zsh
332deleted file mode 100644
333index 5e9bcf10a4ed23a24bdd4040f6501f3b43562caf..0000000000000000000000000000000000000000
334--- a/plugins/vagrant/vagrant.plugin.zsh
335+++ /dev/null
336@@ -1,3 +0,0 @@
337-fpath=($ZSH/plugins/vagrant $fpath)
338-autoload -U compinit
339-compinit -i
340diff --git a/plugins/yum/yum.plugin.zsh b/plugins/yum/yum.plugin.zsh
341new file mode 100644
342index 0000000000000000000000000000000000000000..d6ba7ed62c91fb9aac9c71e4a0fcbb35aa10cf37
343--- /dev/null
344+++ b/plugins/yum/yum.plugin.zsh
345@@ -0,0 +1,12 @@
346+## Aliases
347+
348+alias ys="yum search" # search package
349+alias yp="yum info" # show package info
350+alias yl="yum list" # list packages
351+alias yli="yum list installed" # print all installed packages
352+
353+alias yu="sudo yum update" # upgrate packages
354+alias yi="sudo yum install" # install package
355+alias yr="sudo yum remove" # remove package
356+alias yrl="sudo yum remove --remove-leaves" # remove package and leaves
357+alias yc="sudo yum clean all" # clean cache
358diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme
359index 1c0ab3cc971e9633b7c42f32e118f0977d30375b..237e70fda314cc6ac047ebfbde7c38b2c641f8c3 100644
360--- a/themes/Soliah.zsh-theme
361+++ b/themes/Soliah.zsh-theme
362@@ -1,4 +1,4 @@
363-PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
364+PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(check_git_prompt_info)
365 $ '
366
367 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
368@@ -16,6 +16,29 @@ ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
369 ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
370 ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
371
372+
373+# Git sometimes goes into a detached head state. git_prompt_info doesn't
374+# return anything in this case. So wrap it in another function and check
375+# for an empty string.
376+function check_git_prompt_info() {
377+ if git rev-parse --git-dir > /dev/null 2>&1; then
378+ if [[ -z $(git_prompt_info) ]]; then
379+ echo "%{$fg[magenta]%}detached-head%{$reset_color%})"
380+ else
381+ echo "$(git_prompt_info)"
382+ fi
383+ fi
384+}
385+
386+# Determine if we are using a gemset.
387+function rvm_gemset() {
388+ GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
389+ if [[ -n $GEMSET ]]; then
390+ echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
391+ fi
392+
393+}
394+
395 # Determine the time since last commit. If branch is clean,
396 # use a neutral color, otherwise colors will vary according to time.
397 function git_time_since_commit() {
398@@ -49,15 +72,15 @@ function git_time_since_commit() {
399 fi
400
401 if [ "$HOURS" -gt 24 ]; then
402- echo "($COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
403+ echo "($(rvm_gemset)$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
404 elif [ "$MINUTES" -gt 60 ]; then
405- echo "($COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
406+ echo "($(rvm_gemset)$COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
407 else
408- echo "($COLOR${MINUTES}m%{$reset_color%}|"
409+ echo "($(rvm_gemset)$COLOR${MINUTES}m%{$reset_color%}|"
410 fi
411 else
412 COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
413- echo "($COLOR~|"
414+ echo "($(rvm_gemset)$COLOR~|"
415 fi
416 fi
417 }
418diff --git a/themes/bira.zsh-theme b/themes/bira.zsh-theme
419index f0ee6a5bded2ca01dc9dbf2bb6ca8f1890eb2b34..5642eaeb86001bd4d4257f89f63b76cd0ab43842 100644
420--- a/themes/bira.zsh-theme
421+++ b/themes/bira.zsh-theme
422@@ -3,7 +3,7 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
423
424 local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
425 local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
426-local rvm_ruby='%{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v g)›%{$reset_color%}'
427+local rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
428 local git_branch='$(git_prompt_info)%{$reset_color%}'
429
430 PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
431diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme
432new file mode 100644
433index 0000000000000000000000000000000000000000..f4d65ab742781e1242fb5ca5ffaaf23fe6643c86
434--- /dev/null
435+++ b/themes/dogenpunk.zsh-theme
436@@ -0,0 +1,85 @@
437+# -----------------------------------------------------------------------------
438+# FILE: dogenpunk.zsh-theme
439+# DESCRIPTION: oh-my-zsh theme file.
440+# AUTHOR: Matthew Nelson (dogenpunk@gmail.com)
441+# VERSION: 0.1
442+# SCREENSHOT: coming soon
443+# -----------------------------------------------------------------------------
444+
445+MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
446+local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
447+
448+PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम् %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
449+%{$fg[red]%}%!%{$reset_color%} $(prompt_char) '
450+
451+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}"
452+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
453+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$reset_color%}"
454+ZSH_THEME_GIT_PROMPT_CLEAN=""
455+
456+RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}'
457+
458+ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
459+ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
460+ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
461+ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
462+ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
463+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
464+
465+function prompt_char() {
466+ git branch >/dev/null 2>/dev/null && echo "%{$fg[green]%}±%{$reset_color%}" && return
467+ hg root >/dev/null 2>/dev/null && echo "%{$fg_bold[red]%}☿%{$reset_color%}" && return
468+ echo "%{$fg[cyan]%}◯ %{$reset_color%}"
469+}
470+
471+# Colors vary depending on time lapsed.
472+ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
473+ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
474+ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
475+ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
476+
477+# Determine the time since last commit. If branch is clean,
478+# use a neutral color, otherwise colors will vary according to time.
479+function git_time_since_commit() {
480+ if git rev-parse --git-dir > /dev/null 2>&1; then
481+ # Only proceed if there is actually a commit.
482+ if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
483+ # Get the last commit.
484+ last_commit=`git log --pretty=format:'%at' -1 2> /dev/null`
485+ now=`date +%s`
486+ seconds_since_last_commit=$((now-last_commit))
487+
488+ # Totals
489+ MINUTES=$((seconds_since_last_commit / 60))
490+ HOURS=$((seconds_since_last_commit/3600))
491+
492+ # Sub-hours and sub-minutes
493+ DAYS=$((seconds_since_last_commit / 86400))
494+ SUB_HOURS=$((HOURS % 24))
495+ SUB_MINUTES=$((MINUTES % 60))
496+
497+ if [[ -n $(git status -s 2> /dev/null) ]]; then
498+ if [ "$MINUTES" -gt 30 ]; then
499+ COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"
500+ elif [ "$MINUTES" -gt 10 ]; then
501+ COLOR="$ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM"
502+ else
503+ COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT"
504+ fi
505+ else
506+ COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
507+ fi
508+
509+ if [ "$HOURS" -gt 24 ]; then
510+ echo "($COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
511+ elif [ "$MINUTES" -gt 60 ]; then
512+ echo "($COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|"
513+ else
514+ echo "($COLOR${MINUTES}m%{$reset_color%}|"
515+ fi
516+ else
517+ COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
518+ echo "($COLOR~|"
519+ fi
520+ fi
521+}
522diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme
523new file mode 100644
524index 0000000000000000000000000000000000000000..259640ba40cdee547cc8826126dae6f9e4a9d748
525--- /dev/null
526+++ b/themes/gallois.zsh-theme
527@@ -0,0 +1,19 @@
528+ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
529+ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
530+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
531+ZSH_THEME_GIT_PROMPT_CLEAN=""
532+
533+#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
534+git_custom_status() {
535+ local cb=$(current_branch)
536+ if [ -n "$cb" ]; then
537+ echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
538+ fi
539+}
540+
541+#RVM and git settings
542+if [[ -s ~/.rvm/scripts/rvm ]] ; then
543+ RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
544+fi
545+
546+PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '
547diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
548new file mode 100644
549index 0000000000000000000000000000000000000000..add485279cfcc0df29817e1cabc8b8224e9948af
550--- /dev/null
551+++ b/themes/jonathan.zsh-theme
552@@ -0,0 +1,137 @@
553+function precmd {
554+ local TERMWIDTH
555+ (( TERMWIDTH = ${COLUMNS} - 1 ))
556+
557+
558+ ###
559+ # Truncate the path if it's too long.
560+
561+ PR_FILLBAR=""
562+ PR_PWDLEN=""
563+
564+ local promptsize=${#${(%):---(%n@%m:%l)---()--}}
565+ local rubyprompt=`rvm_prompt_info`
566+ local rubypromptsize=${#${rubyprompt}}
567+ local pwdsize=${#${(%):-%~}}
568+
569+ if [[ "$promptsize + $rubypromptsize + $pwdsize" -gt $TERMWIDTH ]]; then
570+ ((PR_PWDLEN=$TERMWIDTH - $promptsize))
571+ else
572+ PR_FILLBAR="\${(l.(($TERMWIDTH - ($promptsize + $rubypromptsize + $pwdsize)))..${PR_HBAR}.)}"
573+ fi
574+
575+}
576+
577+
578+setopt extended_glob
579+preexec () {
580+ if [[ "$TERM" == "screen" ]]; then
581+ local CMD=${1[(wr)^(*=*|sudo|-*)]}
582+ echo -n "\ek$CMD\e\\"
583+ fi
584+}
585+
586+
587+setprompt () {
588+ ###
589+ # Need this so the prompt will work.
590+
591+ setopt prompt_subst
592+
593+
594+ ###
595+ # See if we can use colors.
596+
597+ autoload colors zsh/terminfo
598+ if [[ "$terminfo[colors]" -ge 8 ]]; then
599+ colors
600+ fi
601+ for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
602+ eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
603+ eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
604+ (( count = $count + 1 ))
605+ done
606+ PR_NO_COLOUR="%{$terminfo[sgr0]%}"
607+
608+ ###
609+ # Modify Git prompt
610+ ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
611+ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
612+ ZSH_THEME_GIT_PROMPT_DIRTY=""
613+ ZSH_THEME_GIT_PROMPT_CLEAN=""
614+
615+ ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
616+ ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
617+ ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
618+ ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
619+ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
620+ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
621+
622+ ###
623+ # See if we can use extended characters to look nicer.
624+
625+ typeset -A altchar
626+ set -A altchar ${(s..)terminfo[acsc]}
627+ PR_SET_CHARSET="%{$terminfo[enacs]%}"
628+ PR_SHIFT_IN="%{$terminfo[smacs]%}"
629+ PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
630+ PR_HBAR=${altchar[q]:--}
631+ PR_ULCORNER=${altchar[l]:--}
632+ PR_LLCORNER=${altchar[m]:--}
633+ PR_LRCORNER=${altchar[j]:--}
634+ PR_URCORNER=${altchar[k]:--}
635+
636+
637+ ###
638+ # Decide if we need to set titlebar text.
639+
640+ case $TERM in
641+ xterm*)
642+ PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
643+ ;;
644+ screen)
645+ PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
646+ ;;
647+ *)
648+ PR_TITLEBAR=''
649+ ;;
650+ esac
651+
652diff --git a/themes/jtriley.zsh-theme b/themes/jtriley.zsh-theme
653new file mode 100644
654index 0000000000000000000000000000000000000000..ec62a2208270b13b3f5b6680434418f5e6793c5e
655--- /dev/null
656+++ b/themes/jtriley.zsh-theme
657@@ -0,0 +1,8 @@
658+#PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
659+PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d
660+%{$fg_bold[yellow]%}%% $(git_prompt_info)%{$reset_color%}"
661+
662+#ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
663+#ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
664+#ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
665+#ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
666diff --git a/themes/murilasso.zsh-theme b/themes/murilasso.zsh-theme
667new file mode 100644
668index 0000000000000000000000000000000000000000..310357b4586efe5b43594277c7ee88f48a2f7152
669--- /dev/null
670+++ b/themes/murilasso.zsh-theme
671@@ -0,0 +1,14 @@
672+local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
673+local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
674+local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}'
675+local rvm_ruby='%{$fg[red]%}$(rvm_prompt_info)%{$reset_color%}'
676+local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}'
677+
678+PROMPT="${user_host}:${current_dir} ${rvm_ruby}
679+${git_branch} %B$%b "
680+RPS1="${return_code}"
681+
682+ZSH_THEME_GIT_PROMPT_PREFIX=""
683+ZSH_THEME_GIT_PROMPT_SUFFIX=""
684+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
685+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
686diff --git a/tools/install.sh b/tools/install.sh
687index 6e3872bb9ef24466ff32e67013128a61eae13679..8ed1403af12109c0dd23051e41c4acf353501fcf 100755
688--- a/tools/install.sh
689+++ b/tools/install.sh
690@@ -5,7 +5,7 @@ then
691 fi
692
693 echo "Cloning Oh My Zsh..."
694-/usr/bin/env git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
695+/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
696
697 echo "Looking for an existing zsh config..."
698 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
699@@ -22,7 +22,7 @@ echo "Copying your current PATH and adding it to the end of ~/.zshrc for you."
700 echo "export PATH=$PATH" >> ~/.zshrc
701
702 echo "Time to change your default shell to zsh!"
703-chsh -s "/usr/bin/env zsh"
704+chsh -s `which zsh`
705
706 echo ' __ __ '
707 echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ '