56f094860bec91c1968d46cccd5d2c2e3d179de1
- 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/README.textile b/README.textile
2index a38e2d7cf83748f562590b4eb9383a827bc8d16f..0a4545bac277459e010242a976c097601d063979 100644
3--- a/README.textile
4+++ b/README.textile
5@@ -26,17 +26,20 @@ h3. The manual way
6
7 @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@
8
9-2. Create a new zsh config by copying the zsh template we've provided.
10+2. *OPTIONAL* Backup your existing ~/.zshrc file
11
12- *NOTE*: If you already have a ~/.zshrc file, you should back it up. @cp ~/.zshrc ~/.zshrc.orig@ in case you want to go back to your original settings.
13+ @cp ~/.zshrc ~/.zshrc.orig@
14+
15+3. Create a new zsh config by copying the zsh template we've provided.
16
17 @cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@
18
19-3. Set zsh as your default shell:
20+
21+4. Set zsh as your default shell:
22
23 @chsh -s /bin/zsh@
24
25-4. Start / restart zsh (open a new terminal is easy enough...)
26+5. Start / restart zsh (open a new terminal is easy enough...)
27
28 h3. Problems?
29
30diff --git a/lib/git.zsh b/lib/git.zsh
31index fb4ad8ca64ffbf7bcfd34ca82b1acbe8947d36bf..258b1df8f477c588ddfd28a0ad80580757021a67 100644
32--- a/lib/git.zsh
33+++ b/lib/git.zsh
34@@ -18,6 +18,25 @@ parse_git_dirty() {
35 fi
36 }
37
38+# get the difference between the local and remote branches
39+git_remote_status() {
40+ remote=${$(git rev-parse --verify ${hook_com[branch]}@{upstream} --symbolic-full-name 2>/dev/null)/refs\/remotes\/}
41+ if [[ -n ${remote} ]] ; then
42+ ahead=$(git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
43+ behind=$(git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
44+
45+ if [ $ahead -eq 0 ] && [ $behind -gt 0 ]
46+ then
47+ echo "$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
48+ elif [ $ahead -gt 0 ] && [ $behind -eq 0 ]
49+ then
50+ echo "$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
51+ elif [ $ahead -gt 0 ] && [ $behind -gt 0 ]
52+ then
53+ echo "$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
54+ fi
55+ fi
56+}
57
58 # Checks if there are commits ahead from remote
59 function git_prompt_ahead() {
60diff --git a/plugins/coffee/_coffee b/plugins/coffee/_coffee
61new file mode 100644
62index 0000000000000000000000000000000000000000..5c8eb9a084050bf740c12992af8b609cb99a104c
63--- /dev/null
64+++ b/plugins/coffee/_coffee
65@@ -0,0 +1,71 @@
66+#compdef coffee
67+# ------------------------------------------------------------------------------
68+# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users
69+# All rights reserved.
70+#
71+# Redistribution and use in source and binary forms, with or without
72+# modification, are permitted provided that the following conditions are met:
73+# * Redistributions of source code must retain the above copyright
74+# notice, this list of conditions and the following disclaimer.
75+# * Redistributions in binary form must reproduce the above copyright
76+# notice, this list of conditions and the following disclaimer in the
77+# documentation and/or other materials provided with the distribution.
78+# * Neither the name of the zsh-users nor the
79+# names of its contributors may be used to endorse or promote products
80+# derived from this software without specific prior written permission.
81+#
82+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
83+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
84+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
85+# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
86+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
87+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
88+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
89+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
90+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
91+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
92+# ------------------------------------------------------------------------------
93+# Description
94+# -----------
95+#
96+# Completion script for Coffee.js v0.6.11 (http://coffeejs.org)
97+#
98+# ------------------------------------------------------------------------------
99+# Authors
100+# -------
101+#
102+# * Mario Fernandez (https://github.com/sirech)
103+#
104+# ------------------------------------------------------------------------------
105+
106+local curcontext="$curcontext" state line ret=1
107+typeset -A opt_args
108+
109+_arguments -C \
110+ '(- *)'{-h,--help}'[display this help message]' \
111+ '(- *)'{-v,--version}'[display the version number]' \
112+ '(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \
113+ '(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \
114+ '(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \
115+ '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]:Destination JS file:_files -g "*.js"' \
116+ '(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]' \
117+ '(--nodejs)--nodejs[pass options directly to the "node" binary]' \
118+ '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \
119+ '(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]:Output Directory:_files -/' \
120+ '(-n -t -p)'{-n,--nodes}'[print out the parse tree that the parser produces]' \
121+ '(-n -t -p)'{-p,--print}'[print out the compiled JavaScript]' \
122+ '(-n -t -p)'{-t,--tokens}'[print out the tokens that the lexer/rewriter produce]' \
123+ '(-r --require)'{-r,--require}'[require a library before executing your script]:library' \
124+ '(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \
125+ '(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \
126+ '*:script or directory:_files' && ret=0
127+
128+return ret
129+
130+# Local Variables:
131+# mode: Shell-Script
132+# sh-indentation: 2
133+# indent-tabs-mode: nil
134+# sh-basic-offset: 2
135+# End:
136+# vim: ft=zsh sw=2 ts=2 et
137diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh
138index 5ab03d5a9a57c3ff3f46a9ae881e6bb1643becbd..567da1b450014b4db7b5445bf564973b76c1afea 100644
139--- a/plugins/command-not-found/command-not-found.plugin.zsh
140+++ b/plugins/command-not-found/command-not-found.plugin.zsh
141@@ -2,4 +2,4 @@
142 # as seen in http://www.porcheron.info/command-not-found-for-zsh/
143 # this is installed in Ubuntu
144
145-source /etc/zsh_command_not_found
146+[[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found
147diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh
148index 71b343884a5428660c92ce86ca63823d4337f8c7..ea4caa016205bfa6b79ce1c7db7a1836327f3213 100644
149--- a/plugins/git-flow/git-flow.plugin.zsh
150+++ b/plugins/git-flow/git-flow.plugin.zsh
151@@ -195,7 +195,7 @@ __git-flow-feature ()
152 'start:Start a new feature branch.'
153 'finish:Finish a feature branch.'
154 'list:List all your feature branches. (Alias to `git flow feature`)'
155- 'publish: public'
156+ 'publish: publish'
157 'track: track'
158 'diff: diff'
159 'rebase: rebase'
160diff --git a/plugins/git-hubflow/git-hubflow.plugin.zsh b/plugins/git-hubflow/git-hubflow.plugin.zsh
161new file mode 100644
162index 0000000000000000000000000000000000000000..a09f88391778e6af32ab4329aa53542a90f2ae80
163--- /dev/null
164+++ b/plugins/git-hubflow/git-hubflow.plugin.zsh
165@@ -0,0 +1,348 @@
166+#!zsh
167+#
168+# Installation
169+# ------------
170+#
171+# To achieve git-hubflow completion nirvana:
172+#
173+# 0. Update your zsh's git-completion module to the newest verion.
174+# From here. http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD
175+#
176+# 1. Install this file. Either:
177+#
178+# a. Place it in your .zshrc:
179+#
180+# b. Or, copy it somewhere (e.g. ~/.git-hubflow-completion.zsh) and put the following line in
181+# your .zshrc:
182+#
183+# source ~/.git-hubflow-completion.zsh
184+#
185+# c. Or, use this file as a oh-my-zsh plugin.
186+#
187+
188+_git-hf ()
189+{
190+ local curcontext="$curcontext" state line
191+ typeset -A opt_args
192+
193+ _arguments -C \
194+ ':command:->command' \
195+ '*::options:->options'
196+
197+ case $state in
198+ (command)
199+
200+ local -a subcommands
201+ subcommands=(
202+ 'init:Initialize a new git repo with support for the branching model.'
203+ 'feature:Manage your feature branches.'
204+ 'release:Manage your release branches.'
205+ 'hotfix:Manage your hotfix branches.'
206+ 'support:Manage your support branches.'
207+ 'update:Pull upstream changes down into your master and develop branches.'
208+ 'version:Shows version information.'
209+ )
210+ _describe -t commands 'git hf' subcommands
211+ ;;
212+
213+ (options)
214+ case $line[1] in
215+
216+ (init)
217+ _arguments \
218+ -f'[Force setting of gitflow branches, even if already configured]'
219+ ;;
220+
221+ (version)
222+ ;;
223+
224+ (hotfix)
225+ __git-hf-hotfix
226+ ;;
227+
228+ (release)
229+ __git-hf-release
230+ ;;
231+
232+ (feature)
233+ __git-hf-feature
234+ ;;
235+ esac
236+ ;;
237+ esac
238+}
239+
240+__git-hf-release ()
241+{
242+ local curcontext="$curcontext" state line
243+ typeset -A opt_args
244+
245+ _arguments -C \
246+ ':command:->command' \
247+ '*::options:->options'
248+
249+ case $state in
250+ (command)
251+
252+ local -a subcommands
253+ subcommands=(
254+ 'start:Start a new release branch.'
255+ 'finish:Finish a release branch.'
256+ 'list:List all your release branches. (Alias to `git hf release`)'
257+ 'cancel:Cancel release'
258+ 'push:Push release to github'
259+ 'pull:Pull release from github'
260+ 'track:Track release'
261+ )
262+ _describe -t commands 'git hf release' subcommands
263+ _arguments \
264+ -v'[Verbose (more) output]'
265diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
266index 71388c53a160de66d5237e146c6f77ffe75507f9..14ae78d416b1a8ed8830695d8d5593b3c548ff5b 100644
267--- a/plugins/git/git.plugin.zsh
268+++ b/plugins/git/git.plugin.zsh
269@@ -5,7 +5,7 @@ alias gst='git status'
270 compdef _git gst=git-status
271 alias gl='git pull'
272 compdef _git gl=git-pull
273-alias gup='git fetch && git rebase'
274+alias gup='git pull --rebase'
275 compdef _git gup=git-fetch
276 alias gp='git push'
277 compdef _git gp=git-push
278@@ -38,6 +38,7 @@ alias gm='git merge'
279 compdef _git gm=git-merge
280 alias grh='git reset HEAD'
281 alias grhh='git reset HEAD --hard'
282+alias gwc='git whatchanged -p --abbrev-commit --pretty=medium'
283
284 # Will cd into the top of the current repository
285 # or submodule.
286diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
287index 197e86a48743419f79cceb8f4d4ebdafca0a5972..598b059c18753f0f76002a2e93046f037c1c9e56 100644
288--- a/plugins/github/github.plugin.zsh
289+++ b/plugins/github/github.plugin.zsh
290@@ -61,6 +61,7 @@ exist_gh() { # [DIRECTORY]
291 cd "$1"
292 name=$( git config user.name )
293 ghuser=$( git config github.user )
294+ repo=$1
295
296 git remote add origin git@github.com:${ghuser}/${repo}.git
297 git push -u origin master
298diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku
299index dc899e2b2a3e07b6d36501b4b1b6f4f6211302db..a95c38647f9bde735428d46db379f331fcf62113 100644
300--- a/plugins/heroku/_heroku
301+++ b/plugins/heroku/_heroku
302@@ -154,5 +154,6 @@ case "$words[1]" in
303 _arguments \
304 $_command_args \
305 '(--app)--app[the app name]' \
306+ '(--remote)--remote[the remote name]' \
307 && return 0
308
309diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
310index 636e4619e37be6b64eea2ee1fed5d62bb0b8f98b..de8d1052952acd5fc4934e290730a4813f6c590e 100644
311--- a/plugins/jira/jira.plugin.zsh
312+++ b/plugins/jira/jira.plugin.zsh
313@@ -14,7 +14,7 @@ open_jira_issue () {
314 `open $jira_url/secure/CreateIssue!default.jspa`;
315 else
316 echo "Opening issue #$1";
317- `open $jira_url/issues/$1`;
318+ `open $jira_url/browse/$1`;
319 fi
320 fi
321 }
322diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh
323new file mode 100644
324index 0000000000000000000000000000000000000000..5b3121d11d1992b2377cdf111f1d931a0b570bc1
325--- /dev/null
326+++ b/plugins/last-working-dir/last-working-dir.plugin.zsh
327@@ -0,0 +1,23 @@
328+#!/usr/bin/env zsh
329+# Keeps track of the last used working directory and automatically jumps
330+# into it for new shells.
331+
332+# Flag indicating if we've previously jumped to last directory.
333+typeset -g ZSH_LAST_WORKING_DIRECTORY
334+local cache_file="$ZSH/cache/last-working-dir"
335+
336+# Updates the last directory once directory is changed.
337+function chpwd() {
338+ echo "$PWD" > "$cache_file"
339+}
340+
341+# Changes directory to the last working directory.
342+function lwd() {
343+ [[ ! -r "$cache_file" ]] || cd `cat "$cache_file"`
344+}
345+
346+# Automatically jump to last working directory unless this isn't the first time
347+# this plugin has been loaded.
348+if [[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]]; then
349+ lwd 2>/dev/null && ZSH_LAST_WORKING_DIRECTORY=1 || true
350+fi
351diff --git a/plugins/pass/_pass b/plugins/pass/_pass
352new file mode 100644
353index 0000000000000000000000000000000000000000..f6c1a6c4bd36ebe5fd6e347412e730578cc73000
354--- /dev/null
355+++ b/plugins/pass/_pass
356@@ -0,0 +1,119 @@
357+#compdef pass
358+#autoload
359+
360+# Copyright (C) 2012:
361+# Johan Venant <jvenant@invicem.pro>
362+# Brian Mattern <rephorm@rephorm.com>
363+# Jason A. Donenfeld <Jason@zx2c4.com>.
364+# Santiago Borrazás <sanbor@gmail.com>
365+# All Rights Reserved.
366+# This file is licensed under the GPLv2+. Please see COPYING for more information.
367+
368+
369+_pass () {
370+ local cmd
371+ if (( CURRENT > 2)); then
372+ cmd=${words[2]}
373+ # Set the context for the subcommand.
374+ curcontext="${curcontext%:*:*}:pass-$cmd"
375+ # Narrow the range of words we are looking at to exclude `pass'
376+ (( CURRENT-- ))
377+ shift words
378+ # Run the completion for the subcommand
379+ case "${cmd}" in
380+ init)
381+ _arguments : \
382+ "-r[re-encrypt existing passwords]" \
383+ "--reencrypt[re-encrypt existing passwords]"
384+ _pass_complete_keys
385+ ;;
386+ ls|list|edit)
387+ _pass_complete_entries_with_subdirs
388+ ;;
389+ insert)
390+ _arguments : \
391+ "-e[echo password to console]" \
392+ "--echo[echo password to console]" \
393+ "-m[multiline]" \
394+ "--multiline[multiline]"
395+ _pass_complete_entries_with_subdirs
396+ ;;
397+ generate)
398+ _arguments : \
399+ "-n[don't include symbols in password]" \
400+ "--no-symbols[don't include symbols in password]" \
401+ "-c[copy password to the clipboard]" \
402+ "--clip[copy password to the clipboard]"
403+ _pass_complete_entries_with_subdirs
404+ ;;
405+ rm)
406+ _arguments : \
407+ "-f[force deletion]" \
408+ "--force[force deletion]" \
409+ "-r[recursively delete]" \
410+ "--recursive[recursively delete]"
411+ _pass_complete_entries_with_subdirs
412+ ;;
413+ git)
414+ local -a subcommands
415+ subcommands=(
416+ "init:Initialize git repository"
417+ "push:Push to remote repository"
418+ "pull:Pull from remote repository"
419+ "config:Show git config"
420+ "log:Show git log"
421+ "reflog:Show git reflog"
422+ )
423+ _describe -t commands 'pass git' subcommands
424+ ;;
425+ show|*)
426+ _pass_cmd_show
427+ ;;
428+ esac
429+ else
430+ local -a subcommands
431+ subcommands=(
432+ "init:Initialize new password storage"
433+ "ls:List passwords"
434+ "show:Decrypt and print a password"
435+ "insert:Insert a new password"
436+ "generate:Generate a new password using pwgen"
437+ "edit:Edit a password with \$EDITOR"
438+ "rm:Remove the password"
439+ "git:Call git on the password store"
440+ "version:Output version information"
441+ "help:Output help message"
442+ )
443+ _describe -t commands 'pass' subcommands
444+ _arguments : \
445+ "--version[Output version information]" \
446+ "--help[Output help message]"
447+ _pass_cmd_show
448+ fi
449+}
450+
451+_pass_cmd_show () {
452+ _arguments : \
453+ "-c[put it on the clipboard]" \
454+ "--clip[put it on the clipboard]"
455+ _pass_complete_entries
456diff --git a/plugins/per-directory-history/per-directory-history.plugin.zsh b/plugins/per-directory-history/per-directory-history.plugin.zsh
457index 22383b8b96cf7ff31738fe4ebf3d9a8f28223e13..61e8b5a62753d7d4af5772115203d32acff1e743 100644
458--- a/plugins/per-directory-history/per-directory-history.plugin.zsh
459+++ b/plugins/per-directory-history/per-directory-history.plugin.zsh
460@@ -65,12 +65,13 @@
461 function per-directory-history-toggle-history() {
462 if [[ $_per_directory_history_is_global == true ]]; then
463 _per-directory-history-set-directory-history
464- echo "using local history\n"
465+ print "\nusing local history\n"
466 else
467 _per-directory-history-set-global-history
468- echo "using global history\n"
469+ print "\nusing global history\n"
470 fi
471- zle reset-prompt
472+ zle .push-line
473+ zle .accept-line
474 }
475
476 autoload per-directory-history-toggle-history
477diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh
478index 4aa7a05d6db43ff6a824cf90553564e9fa9572ec..cd232a6aec2f2a28897c0a9b2f1b7a6ba16e7ea6 100644
479--- a/plugins/rails/rails.plugin.zsh
480+++ b/plugins/rails/rails.plugin.zsh
481@@ -5,6 +5,7 @@ alias sp='ruby script/plugin'
482 alias sr='ruby script/runner'
483 alias ssp='ruby script/spec'
484 alias rdbm='rake db:migrate'
485+alias rdbtp='rake db:test:prepare'
486 alias sc='ruby script/console'
487 alias sd='ruby script/server --debugger'
488 alias devlog='tail -f log/development.log'
489diff --git a/plugins/rvm/_rvm b/plugins/rvm/_rvm
490deleted file mode 100644
491index bba5304a032647ca5ce34165b2ac71ceff2db5f8..0000000000000000000000000000000000000000
492--- a/plugins/rvm/_rvm
493+++ /dev/null
494@@ -1,147 +0,0 @@
495-#compdef rvm
496-
497-local curcontext="$curcontext" state line cmds ret=1
498-
499-_arguments -C \
500- '(- 1 *)'{-v,--version}'[display version information]' \
501- '(-l|--level)'{-l,--level}'+[patch level to use with rvm use / install]:number' \
502- '(--prefix)--prefix[path for all rvm files (~/.rvm/), with trailing slash!]:path:_files' \
503- '(--bin)--bin[path for binaries to be placed (~/.rvm/bin/)]:path:_files' \
504- '(--source)--source[src directory to use (~/.rvm/src/)]:path:_files' \
505- '(--archives)--archives[directory for downladed files (~/.rvm/archives/)]:path:_files' \
506- '-S[Specify a script file to attempt to load and run (rubydo)]:file:_files' \
507- '-e[Execute code from the command line]:code' \
508- '(-G)-G[root gem path to use]:path:_files' \
509- '(--gems)--gems[Used to set the gems_flag, use with remove to remove gems]' \
510- '(--archive)--archive[Used to set the archive_flag, use with remove to remove archive]' \
511- '(--patch)--patch[With MRI Rubies you may specify one or more full paths to patches]' \
512- '(-C|--configure)'{-C,--configure}'=[custom configure options]' \
513- '(--nice)--nice[process niceness (for slow computers, default 0)]:number' \
514- '(--ree)--ree-options[Options passed directly to ree ./installer on the command line]:options' \
515- '(--head)--head[with update, updates rvm to git head version]' \
516- '(--rubygems)--rubygems[with update, updates rubygems for selected ruby]' \
517- '(--default)--default[with ruby select, sets a default ruby for new shells]' \
518- '(--debug)--debug[Toggle debug mode on for very verbose output]' \
519- '(--trace)--trace[Toggle trace mode on to see EVERYTHING rvm is doing]' \
520- '(--force)--force[Force install, removes old install & source before install]' \
521- '(--summary)--summary[Used with rubydo to print out a summary of the commands run]' \
522- '(--latest)--latest[with gemset --dump skips version strings for latest gem]' \
523- '(--gems)--gems[with uninstall/remove removes gems with the interpreter]' \
524- '(--docs)--docs[with install, attempt to generate ri after installation]' \
525- '(--reconfigure)--reconfigure[Force ./configure on install even if Makefile already exists]' \
526- '1: :->cmds' \
527- '*: :->args' && ret=0
528-
529-case $state in
530- cmds)
531- cmds=(
532- "version:show the rvm version installed in rvm_path"
533- "use:setup current shell to use a specific ruby version"
534- "reload:reload rvm source itself (useful after changing rvm source)"
535- "implode:(seppuku) removes the rvm installation completely. This means everything in $rvm_path (~/.rvm)."
536- "update:upgrades rvm to the latest version."
537- "reset:remove current and stored default & system settings."
538- "info :show the *current* environment information for current ruby"
539- "current:print the *current* ruby version and the name of any gemset being used."
540- "debug:show info plus additional information for common issues"
541- "install:install one or many ruby versions"
542- "uninstall:uninstall one or many ruby versions, leaves their sources"
543- "remove:uninstall one or many ruby versions and remove their sources"
544- "migrate:Lets you migrate all gemsets from one ruby to another."
545- "upgrade:Lets you upgrade from one version of a ruby to another, including migrating your gemsets semi-automatically."
546- "wrapper:generates a set of wrapper executables for a given ruby with the specified ruby and gemset combination. Used under the hood for passenger support and the like."
547- "cleanup:Lets you remove stale source folders / archives and other miscellaneous data associated with rvm."
548- "repair:Lets you repair parts of your environment e.g. wrappers, env files and and similar files (e.g. general maintenance)."
549- "snapshot:Lets your backup / restore an rvm installation in a lightweight manner."
550- "disk-usage:Tells you how much disk space rvm install is using."
551- "tools:Provides general information about the ruby environment, primarily useful when scripting rvm."
552- "docs:Tools to make installing ri and rdoc documentation easier."
553- "rvmrc:Tools related to managing rvmrc trust and loading."
554- "exec:runs an arbitrary command as a set operation."
555- "ruby:runs a named ruby file against specified and/or all rubies"
556- "gem:runs a gem command using selected ruby's 'gem'"
557- "rake:runs a rake task against specified and/or all rubies"
558- "tests:runs 'rake test' across selected ruby versions"
559- "specs:runs 'rake spec' across selected ruby versions"
560- "monitor:Monitor cwd for testing, run rake {spec,test} on changes."
561- "gemset:gemsets: http://rvm.beginrescueend.com/gemsets/"
562- "rubygems:Switches the installed version of rubygems for the current ruby."
563- "gemdir:display the path to the current gem directory (GEM_HOME)."
564- "srcdir:display the path to rvm source directory (may be yanked)"
565- "fetch:Performs an archive / src fetch only of the selected ruby."
566- "list:show currently installed rubies, interactive output."
567- "package:Install a dependency package {readline,iconv,zlib,openssl}"
568- "notes:Display notes, with operating system specifics."
569- "export:Temporarily set an environment variable in the current shell."
570- "unexport:Undo changes made to the environment by 'rvm export'."
571- )
572- _describe -t commands 'rvm command' cmds && ret=0
573- ;;
574- args)
575- case $line[1] in
576- (use|uninstall|remove|list)
577- _values -S , 'rubies' $(rvm list strings | sed -e 's/ruby-\([^) ]*\)-\([^) ]*\)/ruby-\1-\2 \1-\2 \1/g') default system && ret=0
578- ;;
579- (install|fetch)
580- _values -S , 'rubies' $(rvm list known_strings) && ret=0
581- ;;
582- gemset)
583- if (( CURRENT == 3 )); then
584- _values 'gemset_commands' \
585- 'import' \
586- 'export' \
587- 'create' \
588- 'copy' \
589- 'rename' \
590- 'empty' \
591- 'delete' \
592- 'name' \
593- 'dir' \
594diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh
595index 604c0071393b07f0edcc6dbd80a4c6b0d290e7cd..27f29f2b338cd073d7e4315f867fe748ec81579f 100644
596--- a/plugins/rvm/rvm.plugin.zsh
597+++ b/plugins/rvm/rvm.plugin.zsh
598@@ -1,3 +1,5 @@
599+fpath=($rvm_path/scripts/zsh/Completion $fpath)
600+
601 alias rubies='rvm list rubies'
602 alias gemsets='rvm gemset list'
603
604diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh
605index 98178e807cce8d2f9363c0dda5d53bbc8466456d..7009e7a91bcdf1294353af7e9394b2ef97feedeb 100644
606--- a/plugins/screen/screen.plugin.zsh
607+++ b/plugins/screen/screen.plugin.zsh
608@@ -1,6 +1,6 @@
609 # if using GNU screen, let the zsh tell screen what the title and hardstatus
610 # of the tab window should be.
611-if [[ $TERM == "screen" ]]; then
612+if [[ "$TERM" == screen* ]]; then
613 if [[ $_GET_PATH == '' ]]; then
614 _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^\/home\//~/;s/^~$USER/~/"'
615 fi
616diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh
617index bd2767e3ee6b465c587c4a71777620f25183795d..e38e8920b92d9482dff4e676a8a576480d7e7964 100644
618--- a/plugins/svn/svn.plugin.zsh
619+++ b/plugins/svn/svn.plugin.zsh
620@@ -1,7 +1,15 @@
621+
622 function svn_prompt_info {
623 if [ $(in_svn) ]; then
624+ if [ "x$SVN_SHOW_BRANCH" = "xtrue" ]; then
625+ unset SVN_SHOW_BRANCH
626+ _DISPLAY=$(svn_get_branch_name)
627+ else
628+ _DISPLAY=$(svn_get_repo_name)
629+ fi
630 echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_PREFIX\
631-$ZSH_THEME_REPO_NAME_COLOR$(svn_get_repo_name)$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$ZSH_PROMPT_BASE_COLOR"
632+$ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$ZSH_PROMPT_BASE_COLOR"
633+ unset _DISPLAY
634 fi
635 }
636
637@@ -15,11 +23,21 @@ function in_svn() {
638 function svn_get_repo_name {
639 if [ $(in_svn) ]; then
640 svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT
641-
642+
643 svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p"
644 fi
645 }
646
647+function svn_get_branch_name {
648+ _DISPLAY=$(svn info 2> /dev/null | awk -F/ '/^URL:/ { for (i=0; i<=NF; i++) { if ($i == "branches" || $i == "tags" ) { print $(i+1); break }; if ($i == "trunk") { print $i; break } } }')
649+ if [ "x$_DISPLAY" = "x" ]; then
650+ svn_get_repo_name
651+ else
652+ echo $_DISPLAY
653+ fi
654+ unset _DISPLAY
655+}
656+
657 function svn_get_rev_nr {
658 if [ $(in_svn) ]; then
659 svn info 2> /dev/null | sed -n s/Revision:\ //p
660@@ -29,9 +47,11 @@ function svn_get_rev_nr {
661 function svn_dirty_choose {
662 if [ $(in_svn) ]; then
663 svn status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'
664- if [ $pipestatus[-1] -ne 0 ]; then
665+ if [ $pipestatus[-1] -eq 0 ]; then
666+ # Grep exits with 0 when "One or more lines were selected", return "dirty".
667 echo $1
668- else
669+ else
670+ # Otherwise, no lines were found, or an error occurred. Return clean.
671 echo $2
672 fi
673 fi
674diff --git a/plugins/urltools/urltools.plugin.zsh b/plugins/urltools/urltools.plugin.zsh
675index 0d29314d6790700a681af8c0d6ffde94e5303b47..3de74ae3da10b5acb240e05a4a74f34fd1070447 100644
676--- a/plugins/urltools/urltools.plugin.zsh
677+++ b/plugins/urltools/urltools.plugin.zsh
678@@ -4,6 +4,6 @@
679 # Taken from:
680 # http://ruslanspivak.com/2010/06/02/urlencode-and-urldecode-from-a-command-line/
681
682-alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
683+alias urlencode='node -e "console.log(encodeURIComponent(process.argv[1]))"'
684
685-alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
686+alias urldecode='node -e "console.log(decodeURIComponent(process.argv[1]))"'
687diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
688index d29eb1dda85de0b8aa9416643166c5f4081d468b..c47ab72114562251e4ca75f1395dcaea1abe2002 100644
689--- a/plugins/vi-mode/vi-mode.plugin.zsh
690+++ b/plugins/vi-mode/vi-mode.plugin.zsh
691@@ -5,12 +5,7 @@ function zle-line-init zle-keymap-select {
692 zle -N zle-line-init
693 zle -N zle-keymap-select
694
695-#changing mode clobbers the keybinds, so store the keybinds before and execute
696-#them after
697-binds=`bindkey -L`
698 bindkey -v
699-for bind in ${(@f)binds}; do eval $bind; done
700-unset binds
701
702 # if mode indicator wasn't setup by theme, define default
703 if [[ "$MODE_INDICATOR" == "" ]]; then
704diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
705new file mode 100644
706index 0000000000000000000000000000000000000000..9f777e84784a6d803f2164d620ff664e07c14375
707--- /dev/null
708+++ b/themes/adben.zsh-theme
709@@ -0,0 +1,26 @@
710+#!/usr/bin/env zsh
711+local USER_HOST='%{$terminfo[bold]$fg[yellow]%}%n@%m%{$reset_color%}'
712+local RETURN_CODE="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
713+local GIT_BRANCH='%{$terminfo[bold]$fg[red]%}$(git_prompt_info)%{$reset_color%}'
714+local CURRENT_DIR='%{$terminfo[bold]$fg[green]%} %~%{$reset_color%}'
715+local RUBY_RVM='%{$fg[gray]%}‹$(rvm-prompt i v g)›%{$reset_color%}'
716+local COMMAND_TIP='%{$terminfo[bold]$fg[blue]%}$(wget -qO - http://www.commandlinefu.com/commands/random/plaintext | sed 1d | sed '/^$/d' | sed 's/^/║/g')%{$reset_color%}'
717+######### PROMPT #########
718+PROMPT="%{$terminfo[bold]$fg[blue]%}╔═ %{$reset_color%}${USER_HOST} ${CURRENT_DIR} ${RUBY_RVM} ${GIT_BRANCH}
719+${COMMAND_TIP}
720+%{$terminfo[bold]$fg[blue]%}╚═ %{$reset_color%}%B%{$terminfo[bold]$fg[white]%}$%b%{$reset_color%} "
721+RPS1='${RETURN_CODE}'
722+RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
723+######### PROMPT #########
724+########## GIT ###########
725+ZSH_THEME_GIT_PROMPT_PREFIX="‹"
726+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%}›"
727+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘"
728+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔"
729+ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}"
730+ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}"
731+ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}"
732+ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}"
733+ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}"
734+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}"
735+########## GIT ###########
736diff --git a/themes/frisk.zsh-theme b/themes/frisk.zsh-theme
737index f181aec9017616a2f938d8e857756be06214e14c..2c999a6a6f0c29a77ccda3b17814db10f39f95dc 100644
738--- a/themes/frisk.zsh-theme
739+++ b/themes/frisk.zsh-theme
740@@ -1,10 +1,22 @@
741 PROMPT=$'
742-%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
743+%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)$(bzr_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
744 %{$fg_bold[black]%}>%{$reset_color%} '
745
746 PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"
747
748-ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
749+GIT_CB="git::"
750+ZSH_THEME_SCM_PROMPT_PREFIX="%{$fg[green]%}["
751+ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB
752 ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
753 ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
754 ZSH_THEME_GIT_PROMPT_CLEAN=""
755+
756+## Bazaar integration
757+bzr_prompt_info() {
758+ BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'`
759+ if [ -n "$BZR_CB" ]; then
760+ BZR_DIRTY=""
761+ [[ -n `bzr status` ]] && BZR_DIRTY="%{$fg[red]%} *%{$reset_color%}"
762+ echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX"
763+ fi
764+}
765diff --git a/themes/frontcube.zsh-theme b/themes/frontcube.zsh-theme
766new file mode 100644
767index 0000000000000000000000000000000000000000..d9f5b6d9cec8f04c2002243416ff9c20779feda7
768--- /dev/null
769+++ b/themes/frontcube.zsh-theme
770@@ -0,0 +1,12 @@
771+local rvm="%{$fg[green]%}[$(rvm-prompt i v g)]%{$reset_color%}"
772+
773+PROMPT='
774+%{$fg_bold[gray]%}%~%{$fg_bold[blue]%}%{$fg_bold[blue]%} % %{$reset_color%}
775+%{$fg[green]%}➞ %{$reset_color%'
776+
777+RPROMPT='$(git_prompt_info) $(rvm)'
778+
779+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[git:"
780+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
781+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[red]%}✖ %{$reset_color%}"
782+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] %{$fg[green]%}✔%{$reset_color%}"
783diff --git a/themes/intheloop.zsh-theme b/themes/intheloop.zsh-theme
784new file mode 100644
785index 0000000000000000000000000000000000000000..85b4a4d9583c1d3b1cce339e3bec467ea2c07e03
786--- /dev/null
787+++ b/themes/intheloop.zsh-theme
788@@ -0,0 +1,24 @@
789+# ZSH theme by James Smith (http://loopj.com)
790+# A multiline prompt with username, hostname, full path, return status, git branch, git dirty status, git remote status
791+
792+local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
793+
794+local host_color="green"
795+if [ -n "$SSH_CLIENT" ]; then
796+ local host_color="red"
797+fi
798+
799+PROMPT='
800+%{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c%{$reset_color%} $(git_prompt_info) $(git_remote_status)
801+%{$fg_bold[cyan]%}❯%{$reset_color%} '
802+
803+
804+RPROMPT='${return_status}%{$reset_color%}'
805+
806+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}(%{$fg[red]%}"
807+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
808+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[grey]%}) %{$fg[yellow]%}⚡%{$reset_color%}"
809+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%})"
810+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%{$fg_bold[magenta]%}↓%{$reset_color%}"
811+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%{$fg_bold[magenta]%}↑%{$reset_color%}"
812+ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}↕%{$reset_color%}"
813diff --git a/themes/minimal.zsh-theme b/themes/minimal.zsh-theme
814index ee3ab6b224a097a3072d894ac111d11adc7bf77c..a2a16031f9c886975eba293f7b876a40c20d805e 100644
815--- a/themes/minimal.zsh-theme
816+++ b/themes/minimal.zsh-theme
817@@ -1,15 +1,18 @@
818 ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
819-ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
820-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}"
821-ZSH_THEME_GIT_PROMPT_CLEAN=""
822+ZSH_THEME_GIT_PROMPT_SUFFIX=""
823+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}]%{$reset_color%} "
824+ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
825+ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
826+ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
827+ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
828+ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
829
830-#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
831-git_custom_status() {
832- local cb=$(current_branch)
833- if [ -n "$cb" ]; then
834- echo "- $ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
835- fi
836+vcs_status() {
837+ if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then
838+ svn_prompt_info
839+ else
840+ git_prompt_info
841+ fi
842 }
843
844-
845-PROMPT='%2~ $(git_custom_status) »%b '
846+PROMPT='%2~ $(vcs_status)»%b '
847diff --git a/themes/tjkirch_mod.zsh-theme b/themes/tjkirch_mod.zsh-theme
848new file mode 100644
849index 0000000000000000000000000000000000000000..1b206a7e1f85e4a0b0d6fa208914a8f2c62dda3c
850--- /dev/null
851+++ b/themes/tjkirch_mod.zsh-theme
852@@ -0,0 +1,13 @@
853+ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}"
854+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
855+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡"
856+ZSH_THEME_GIT_PROMPT_CLEAN=""
857+
858+function prompt_char {
859+ if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
860+}
861+
862+PROMPT='%(?,,%{$fg[red]%}FAIL: $?%{$reset_color%}
863+)%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) %_$(prompt_char) '
864+
865+RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
866diff --git a/tools/install.sh b/tools/install.sh
867index b080be3a115c4d9b6feaa3368bbd7e1c9451e84e..6f58db939548daff099ffa0ce10ceef0e69db097 100755
868--- a/tools/install.sh
869+++ b/tools/install.sh
870@@ -13,7 +13,7 @@ hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh
871 echo "\033[0;34mLooking for an existing zsh config...\033[0m"
872 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
873 then
874- echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m";
875+ echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m";
876 cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
877 rm ~/.zshrc;
878 fi