b908feebcfb0ca8a9a80360d177e716c24c317d6

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

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

Diff

This diff is truncated to protect this page.

  1diff --git a/LICENSE.txt b/LICENSE.txt
  2index 42f607f5d0015d99a4554b62ba67647e62b511f3..ed0ae75fcc002fba34dc28521bb388847dd11ffa 100644
  3--- a/LICENSE.txt
  4+++ b/LICENSE.txt
  5@@ -1,6 +1,6 @@
  6 The MIT License (MIT)
  7 
  8-Copyright (c) 2009-2016 Robby Russell and contributors
  9+Copyright (c) 2009-2017 Robby Russell and contributors
 10 See the full list at https://github.com/robbyrussell/oh-my-zsh/contributors
 11 
 12 Permission is hereby granted, free of charge, to any person obtaining a copy
 13diff --git a/lib/completion.zsh b/lib/completion.zsh
 14index bbd02165659dec1032d8f6ef98f0c276e6ab9677..a1e934315f66c290c04f203f890bd1b97e6cd728 100644
 15--- a/lib/completion.zsh
 16+++ b/lib/completion.zsh
 17@@ -5,7 +5,7 @@ WORDCHARS=''
 18 
 19 unsetopt menu_complete   # do not autoselect the first completion entry
 20 unsetopt flowcontrol
 21-setopt auto_menu         # show completion menu on succesive tab press
 22+setopt auto_menu         # show completion menu on successive tab press
 23 setopt complete_in_word
 24 setopt always_to_end
 25 
 26diff --git a/lib/functions.zsh b/lib/functions.zsh
 27index 9f11318d2c06ca78ca2d72cd54291102e4cf364c..f306537846c9662462c127dc61018dfb58bbaa5f 100644
 28--- a/lib/functions.zsh
 29+++ b/lib/functions.zsh
 30@@ -86,7 +86,7 @@ function default() {
 31 }
 32 
 33 #
 34-# Set enviroment variable "$1" to default value "$2" if "$1" is not yet defined.
 35+# Set environment variable "$1" to default value "$2" if "$1" is not yet defined.
 36 #
 37 # Arguments:
 38 #    1. name - The env variable to set
 39diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md
 40index 16f099415e51d6b261a053c4592094e550e822d7..e408db13dabd93959e4ff423619062588adc416a 100644
 41--- a/plugins/archlinux/README.md
 42+++ b/plugins/archlinux/README.md
 43@@ -73,6 +73,8 @@
 44 | pacupd       | sudo pacman -Sy                         | Update and refresh the local package database                |
 45 | pacupg       | sudo pacman -Syu                        | Sync with repositories before upgrading packages             |
 46 | upgrade      | sudo pacman -Syu                        | Sync with repositories before upgrading packages             |
 47+| pacfileupg   | sudo pacman -Fy                         | Download fresh package databases from the server             |
 48+| pacfiles     | pacman -Fs                              | Search package file names for matching strings.              |
 49 
 50 | Function       | Description                                          |
 51 |----------------|------------------------------------------------------|
 52diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh
 53index 3156e949a80275931d09623faba734435d32986d..105bd2d5fdab34c0372dfa5ce5f337106025e290 100644
 54--- a/plugins/archlinux/archlinux.plugin.zsh
 55+++ b/plugins/archlinux/archlinux.plugin.zsh
 56@@ -82,6 +82,8 @@ alias pacinsd='sudo pacman -S --asdeps'
 57 alias pacmir='sudo pacman -Syy'
 58 alias paclsorphans='sudo pacman -Qdt'
 59 alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
 60+alias pacfileupg='sudo pacman -Fy'
 61+alias pacfiles='pacman tFs'
 62 
 63 
 64 if (( $+commands[abs] && $+commands[aur] )); then
 65diff --git a/plugins/autoenv/autoenv.plugin.zsh b/plugins/autoenv/autoenv.plugin.zsh
 66index af58ee77bf853f9cc397bb6bc1c8f16e21beccac..3c1b0fafce8d6471886c1324a52859576e0c4623 100644
 67--- a/plugins/autoenv/autoenv.plugin.zsh
 68+++ b/plugins/autoenv/autoenv.plugin.zsh
 69@@ -1,7 +1,7 @@
 70 # Activates autoenv or reports its failure
 71 () {
 72 if ! type autoenv_init >/dev/null; then
 73-  for d (~/.autoenv /usr/local/opt/autoenv /usr/local/bin); do
 74+  for d (~/.autoenv ~/.local/bin /usr/local/opt/autoenv /usr/local/bin); do
 75     if [[ -e $d/activate.sh ]]; then
 76       autoenv_dir=$d
 77       break
 78diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh
 79index da229cf3547888aaf5993f755dcd0dda5ec4af64..8f398cfb34214953a1934c884da0d217cd995126 100644
 80--- a/plugins/battery/battery.plugin.zsh
 81+++ b/plugins/battery/battery.plugin.zsh
 82@@ -100,7 +100,7 @@ elif [[ "$OSTYPE" = linux*  ]] ; then
 83       else
 84         color='red'
 85       fi
 86-      echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}"
 87+      echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}"
 88     else
 89       echo "∞"
 90     fi
 91diff --git a/plugins/cask/README.md b/plugins/cask/README.md
 92index 6457fd858186d72670f4c791ed9f42b90b615969..e1335c1b85786a1ad265dc7c84775313043c14a1 100644
 93--- a/plugins/cask/README.md
 94+++ b/plugins/cask/README.md
 95@@ -1,11 +1,15 @@
 96-# cask plugin
 97+# Cask plugin
 98 
 99-Loads `cask` completion from non-standard locations, such as if installed
100+[Cask](https://github.com/cask/cask) is a project management tool for Emacs that helps
101+automate the package development cycle; development, dependencies, testing, building,
102+packaging and more.
103+
104+This plugin loads `cask` completion from non-standard locations, such as if installed
105 via Homebrew or others. To enable it, add `cask` to your plugins array:
106 
107 ```zsh
108 plugins=(... cask)
109 ```
110 
111-Make sure you have the `cask` directory in your `$PATH` before loading
112-Oh My Zsh, otherwise you'll get the "command not found" error.
113+Make sure you have the `cask` directory in your `$PATH` before loading Oh My Zsh,
114+otherwise you'll get a "command not found" error.
115diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
116index 07eb1de88c41ab9a56cc4c5d07a92a7c7fce762e..8cf50d50263e6fe340096b644061bbd2a451d569 100644
117--- a/plugins/composer/composer.plugin.zsh
118+++ b/plugins/composer/composer.plugin.zsh
119@@ -39,14 +39,17 @@ alias c='composer'
120 alias csu='composer self-update'
121 alias cu='composer update'
122 alias cr='composer require'
123+alias crm='composer remove'
124 alias ci='composer install'
125 alias ccp='composer create-project'
126 alias cdu='composer dump-autoload'
127+alias cdo='composer dump-autoload --optimize-autoloader'
128 alias cgu='composer global update'
129 alias cgr='composer global require'
130+alias cgrm='composer global remove'
131 
132 # install composer in the current directory
133 alias cget='curl -s https://getcomposer.org/installer | php'
134 
135 # Add Composer's global binaries to PATH
136-export PATH=$PATH:~/.composer/vendor/bin
137+export PATH=$PATH:$(composer global config bin-dir --absolute) 2>/dev/null
138diff --git a/plugins/docker/_docker b/plugins/docker/_docker
139index 415e731f3be16bc75f143c2fdda0f2dafb9cf31b..1aec353c57b0c674051bb1798b2f333d501e0574 100644
140--- a/plugins/docker/_docker
141+++ b/plugins/docker/_docker
142@@ -113,27 +113,27 @@ __docker_get_containers() {
143     return ret
144 }
145 
146-__docker_stoppedcontainers() {
147+__docker_complete_stopped_containers() {
148     [[ $PREFIX = -* ]] && return 1
149     __docker_get_containers stopped all "$@"
150 }
151 
152-__docker_runningcontainers() {
153+__docker_complete_running_containers() {
154     [[ $PREFIX = -* ]] && return 1
155     __docker_get_containers running all "$@"
156 }
157 
158-__docker_containers() {
159+__docker_complete_containers() {
160     [[ $PREFIX = -* ]] && return 1
161     __docker_get_containers all all "$@"
162 }
163 
164-__docker_containers_ids() {
165+__docker_complete_containers_ids() {
166     [[ $PREFIX = -* ]] && return 1
167     __docker_get_containers all ids "$@"
168 }
169 
170-__docker_containers_names() {
171+__docker_complete_containers_names() {
172     [[ $PREFIX = -* ]] && return 1
173     __docker_get_containers all names "$@"
174 }
175@@ -149,25 +149,27 @@ __docker_complete_info_plugins() {
176     return ret
177 }
178 
179-__docker_images() {
180+__docker_complete_images() {
181     [[ $PREFIX = -* ]] && return 1
182     integer ret=1
183     declare -a images
184     images=(${${${(f)${:-"$(_call_program commands docker $docker_options images)"$'\n'}}[2,-1]}/(#b)([^ ]##) ##([^ ]##) ##([^ ]##)*/${match[3]}:${(r:15:: :::)match[2]} in ${match[1]}})
185     _describe -t docker-images "images" images && ret=0
186-    __docker_repositories_with_tags && ret=0
187+    __docker_complete_repositories_with_tags && ret=0
188     return ret
189 }
190 
191-__docker_repositories() {
192+__docker_complete_repositories() {
193     [[ $PREFIX = -* ]] && return 1
194+    integer ret=1
195     declare -a repos
196     repos=(${${${(f)${:-"$(_call_program commands docker $docker_options images)"$'\n'}}%% *}[2,-1]})
197     repos=(${repos#<none>})
198-    _describe -t docker-repos "repositories" repos
199+    _describe -t docker-repos "repositories" repos && ret=0
200+    return ret
201 }
202 
203-__docker_repositories_with_tags() {
204+__docker_complete_repositories_with_tags() {
205     [[ $PREFIX = -* ]] && return 1
206     integer ret=1
207     declare -a repos onlyrepos matched
208@@ -244,7 +246,7 @@ __docker_get_log_options() {
209     return ret
210 }
211 
212-__docker_log_drivers() {
213+__docker_complete_log_drivers() {
214     [[ $PREFIX = -*  ]] && return 1
215     integer ret=1
216     drivers=(awslogs etwlogs fluentd gcplogs gelf journald json-file none splunk syslog)
217@@ -252,7 +254,7 @@ __docker_log_drivers() {
218     return ret
219 }
220 
221-__docker_log_options() {
222+__docker_complete_log_options() {
223     [[ $PREFIX = -* ]] && return 1
224     integer ret=1
225 
226@@ -295,7 +297,7 @@ __docker_complete_pid() {
227     if compset -P '*:'; then
228         case "${${words[-1]%:*}#*=}" in
229             (container)
230-                __docker_runningcontainers && ret=0
231+                __docker_complete_running_containers && ret=0
232                 ;;
233             *)
234                 _message 'value' && ret=0
235@@ -327,36 +329,40 @@ __docker_complete_ps_filters() {
236     if compset -P '*='; then
237         case "${${words[-1]%=*}#*=}" in
238             (ancestor)
239-                __docker_images && ret=0
240+                __docker_complete_images && ret=0
241                 ;;
242diff --git a/plugins/dotenv/README.md b/plugins/dotenv/README.md
243new file mode 100644
244index 0000000000000000000000000000000000000000..ade09fbb20d4dbada9a9363c70666ce507bdd39e
245--- /dev/null
246+++ b/plugins/dotenv/README.md
247@@ -0,0 +1,34 @@
248+# dotenv
249+
250+Automatically load your project ENV variables from `.env` file when you `cd` into project root directory.
251+
252diff --git a/plugins/dotenv/dotenv.plugin.zsh b/plugins/dotenv/dotenv.plugin.zsh
253new file mode 100644
254index 0000000000000000000000000000000000000000..9dd7842293c4a28b4a8d06a012a0204bf325b660
255--- /dev/null
256+++ b/plugins/dotenv/dotenv.plugin.zsh
257@@ -0,0 +1,10 @@
258+#!/bin/zsh
259+
260+source_env() {
261+  if [[ -f .env ]]; then
262+    source .env
263+  fi
264+}
265+
266+autoload -U add-zsh-hook
267+add-zsh-hook chpwd source_env
268diff --git a/plugins/droplr/README.md b/plugins/droplr/README.md
269index cfbec25edaa372e4342fc3c30e22923ff0297930..25cf61db7aff6e36534233d033cc752f4a142c80 100644
270--- a/plugins/droplr/README.md
271+++ b/plugins/droplr/README.md
272@@ -1,6 +1,6 @@
273 # droplr
274 
275-Use [Droplr](https://droplr.com/) from the comand line to upload files and shorten
276+Use [Droplr](https://droplr.com/) from the command line to upload files and shorten
277 links. It needs to have [Droplr.app](https://droplr.com/apps) installed and logged
278 in. MacOS only.
279 
280diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
281index 9d8e4174a8b29a0b519e17156dab883c35514ba4..34942d387b9d0aaa123f0f8d8721167616b82508 100644
282--- a/plugins/git/git.plugin.zsh
283+++ b/plugins/git/git.plugin.zsh
284@@ -43,6 +43,7 @@ alias g='git'
285 alias ga='git add'
286 alias gaa='git add --all'
287 alias gapa='git add --patch'
288+alias gau='git add --update'
289 
290 alias gb='git branch'
291 alias gba='git branch -a'
292diff --git a/plugins/gnu-utils/gnu-utils.plugin.zsh b/plugins/gnu-utils/gnu-utils.plugin.zsh
293index de95f7e6c0824a736fccdcb8fa4f23a576db6823..b66e25d7fc571bdee0e3e98f1e71900d7ce868fa 100644
294--- a/plugins/gnu-utils/gnu-utils.plugin.zsh
295+++ b/plugins/gnu-utils/gnu-utils.plugin.zsh
296@@ -52,7 +52,7 @@ if [[ -x "${commands[gwhoami]}" ]]; then
297 
298       #
299       # This method is inflexible since the aliases are at risk of being
300-      # overriden resulting in the BSD coreutils being called.
301+      # overridden resulting in the BSD coreutils being called.
302       #
303       # (( ${+commands[$gcmd]} )) && \
304       # alias "$gcmd[2,-1]"="${prefix}/${gcmd//"["/"\\["}"
305diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
306index b2015a351d062fc889f0a40c586ca987aef668c6..0adc04a139ef6233857ca7803f7ebdc93aa0a2c3 100644
307--- a/plugins/gradle/gradle.plugin.zsh
308+++ b/plugins/gradle/gradle.plugin.zsh
309@@ -24,29 +24,60 @@ function _gradle_core_commands() {
310 function _gradle_arguments() {
311     _arguments -C \
312     '-a[Do not rebuild project dependencies]' \
313-    '-h[Help]' \
314-    '-D[System property]' \
315+    '-b[Specifies the build file]' \
316+    '-c[Specifies the settings file]' \
317     '-d[Log at the debug level]' \
318-    '--gui[Launches the Gradle GUI app]' \
319-    '--stop[Stop the Gradle daemon]' \
320-    '--daemon[Use the Gradle daemon]' \
321-    '--no-daemon[Do not use the Gradle daemon]' \
322-    '--rerun-task [Specifies that any task optimization is ignored.]' \
323-    '-i[Log at the info level]' \
324-    '-m[Dry run]' \
325-    '-P[Set a project property]' \
326-    '-p[Specifies the start directory]' \
327-    '--profile[Profile the build time]' \
328-    '-q[Log at the quiet level (only show errors)]' \
329-    '-v[Print the Gradle version info]' \
330+    '-g[Specifies the Gradle user home directory]' \
331+    '-h[Shows a help message]' \
332+    '-i[Set log level to INFO]' \
333+    '-m[Runs the build with all task actions disabled]' \
334+    '-p[Specifies the start directory for Gradle]' \
335+    '-q[Log errors only]' \
336+    '-s[Print out the stacktrace also for user exceptions]' \
337+    '-t[Continuous mode. Automatically re-run build after changes]' \
338+    '-u[Don''t search in parent directories for a settings.gradle file]' \
339+    '-v[Prints Gradle version info]' \
340     '-x[Specify a task to be excluded]' \
341-    '-b[Specifies the build file.]' \
342-    '-c[Specifies the settings file.]' \
343-    '--continue[Continues task execution after a task failure.]' \
344-    '-g[Specifies the Gradle user home directory.]' \
345-    '-I[Specifies an initialization script.]' \
346-    '--refresh-dependencies[Refresh the state of dependencies.]' \
347-    '-u[Don''t search in parent directories for a settings.gradle file.]' \
348+    '-D[Set a system property]' \
349+    '-I[Specifies an initialization script]' \
350+    '-P[Sets a project property of the root project]' \
351+    '-S[Print out the full (very verbose) stacktrace]' \
352+    '--build-file[Specifies the build file]' \
353+    '--configure-on-demand[Only relevant projects are configured]' \
354+    '--console[Type of console output to generate (plain, auto, or rich)]' \
355+    '--continue[Continues task execution after a task failure]' \
356+    '--continuous[Continuous mode. Automatically re-run build after changes]' \
357+    '--daemon[Use the Gradle Daemon]' \
358+    '--debug[Log at the debug level]' \
359+    '--dry-run[Runs the build with all task actions disabled]' \
360+    '--exclude-task[Specify a task to be excluded]' \
361+    '--full-stacktrace[Print out the full (very verbose) stacktrace]' \
362+    '--gradle-user-home[Specifies the Gradle user home directory]' \
363+    '--gui[Launches the Gradle GUI app (Deprecated)]' \
364+    '--help[Shows a help message]' \
365+    '--include-build[Run the build as a composite, including the specified build]' \
366+    '--info[Set log level to INFO]' \
367+    '--init-script[Specifies an initialization script]' \
368+    '--max-workers[Set the maximum number of workers that Gradle may use]' \
369+    '--no-daemon[Do not use the Gradle Daemon]' \
370+    '--no-rebuild[Do not rebuild project dependencies]' \
371+    '--no-search-upwards[Don''t search in parent directories for a settings.gradle file]' \
372+    '--offline[Build without accessing network resources]' \
373+    '--parallel[Build projects in parallel]' \
374+    '--profile[Profile build time and create report]' \
375+    '--project-cache-dir[Specifies the project-specific cache directory]' \
376+    '--project-dir[Specifies the start directory for Gradle]' \
377+    '--project-prop[Sets a project property of the root project]' \
378+    '--quiet[Log errors only]' \
379+    '--recompile-scripts[Forces scripts to be recompiled, bypassing caching]' \
380+    '--refresh-dependencies[Refresh the state of dependencies]' \
381+    '--rerun-task[Specifies that any task optimization is ignored]' \
382+    '--settings-file[Specifies the settings file]' \
383+    '--stacktrace[Print out the stacktrace also for user exceptions]' \
384+    '--status[Print Gradle Daemon status]' \
385+    '--stop[Stop all Gradle Daemons]' \
386+    '--system-prop[Set a system property]' \
387+    '--version[Prints Gradle version info]' \
388     '*::command:->command' \
389     && return 0
390 }
391@@ -61,7 +92,7 @@ _gradle_does_task_list_need_generating () {
392 }
393 
394 ##############
395-# Parse the tasks from `gradle(w) tasks --all` into .gradletasknamecache
396+# Parse the tasks from `gradle(w) tasks --all` and return them to the calling function.
397 # All lines in the output from gradle(w) that are between /^-+$/ and /^\s*$/
398 # are considered to be tasks. If and when gradle adds support for listing tasks
399 # for programmatic parsing, this method can be deprecated.
400@@ -76,7 +107,7 @@ _gradle_parse_tasks () {
401       task_name_buffer=""
402     elif [[ $line =~ ^\s*$ ]]; then
403       if [[ "$lines_might_be_tasks" = true ]]; then
404-        # If a newline is found, send the buffer to .gradletasknamecache
405+        # If a newline is found, echo the buffer to the calling function
406         while read -r task; do
407           echo $task | awk '/[a-zA-Z0-9:-]+/ {print $1}'
408         done <<< "$task_name_buffer"
409diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku
410index fd72e530e80be98bfda0af8b3090c16852d58da2..878d3ce1ba6d73977b16c9543d56e09a6e305aff 100644
411--- a/plugins/heroku/_heroku
412+++ b/plugins/heroku/_heroku
413@@ -31,6 +31,10 @@ _1st_arguments=(
414   "domains\:add":"add a custom domain to an app"
415   "domains\:remove":"remove a custom domain from an app"
416   "domains\:clear":"remove all custom domains from an app"
417+  "features":"list available app features"
418+  "features\:disable":"disables a feature"
419+  "features\:enable":"enables an feature"
420+  "features\:info":"displays additional information about feature"
421   "help":"list available commands or display help for a specific command"
422   "keys":"display keys for the current user"
423   "keys\:add":"add a key for the current user"
424@@ -144,5 +148,4 @@ _arguments \
425   '(--app)--app[the app name]' \
426   '(--remote)--remote[the remote name]' \
427   '(--help)--help[help about the current command]' \
428-  &&  return 0
429-
430+  && return 0
431diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh
432index ad316acc84b3a015d75d94500321a2d3d353e2ec..3b8afd31767fe93c17d60bf83284839e3e10b412 100644
433--- a/plugins/history-substring-search/history-substring-search.zsh
434+++ b/plugins/history-substring-search/history-substring-search.zsh
435@@ -244,7 +244,7 @@ _history-substring-search-end() {
436 
437   _history_substring_search_result=$BUFFER
438 
439-  # the search was succesful so display the result properly by clearing away
440+  # the search was successful so display the result properly by clearing away
441   # existing highlights and moving the cursor to the end of the result buffer
442   if [[ $_history_substring_search_refresh_display -eq 1 ]]; then
443     region_highlight=()
444diff --git a/plugins/mix/_mix b/plugins/mix/_mix
445index 57fdf808a7222f14dd76c69505f9e59b01395acd..cfeb4705ee0571f4602f73ae527c70932ef374f8 100644
446--- a/plugins/mix/_mix
447+++ b/plugins/mix/_mix
448@@ -86,6 +86,9 @@ case $state in
449       (test)
450          _files
451          ;;
452+      (run)
453+         _files
454+         ;;
455     esac
456   ;;
457 esac
458diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
459index 04bd186af69b109fe172ce4e14bf8063684c4d4c..c5a7faa0f6b00ac9fe766b252bb408e80d05d97b 100644
460--- a/plugins/mvn/mvn.plugin.zsh
461+++ b/plugins/mvn/mvn.plugin.zsh
462@@ -20,10 +20,9 @@ BACKGROUND_CYAN=`tput setab 6`
463 BACKGROUND_WHITE=`tput setab 7`
464 RESET_FORMATTING=`tput sgr0`
465 
466- 
467+
468 # Wrapper function for Maven's mvn command.
469-mvn-color()
470-{
471+mvn-color() {
472   (
473   # Filter mvn output using sed. Before filtering set the locale to C, so invalid characters won't break some sed implementations
474   unset LANG
475@@ -37,7 +36,7 @@ mvn-color()
476   echo -ne ${RESET_FORMATTING}
477   )
478 }
479- 
480+
481 # Override the mvn command with the colorized one.
482 #alias mvn="mvn-color"
483 
484@@ -65,13 +64,13 @@ alias mvnsrc='mvn dependency:sources'
485 alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc'
486 
487 function listMavenCompletions { 
488-     reply=(
489+    reply=(
490         # common lifecycle
491         clean process-resources compile process-test-resources test-compile test integration-test package verify install deploy site
492-        
493+
494         # common plugins
495diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
496index d7baa11910b272eb62809a9c2928897872a2dd43..e8488ebc94ab5b7cb521b6685dd4f7c5111365ef 100644
497--- a/plugins/osx/osx.plugin.zsh
498+++ b/plugins/osx/osx.plugin.zsh
499@@ -184,6 +184,7 @@ function vncviewer() {
500 # iTunes control function
501 function itunes() {
502 	local opt=$1
503+	local playlist=$2
504 	shift
505 	case "$opt" in
506 		launch|play|pause|stop|rewind|resume|quit)
507@@ -200,6 +201,19 @@ function itunes() {
508 		vol)
509 			opt="set sound volume to $1" #$1 Due to the shift
510 			;;
511+		playlist)
512+		# Inspired by: https://gist.github.com/nakajijapan/ac8b45371064ae98ea7f
513+if [[ ! -z "$playlist" ]]; then
514+                    		osascript -e 'tell application "iTunes"' -e "set new_playlist to \"$playlist\" as string" -e "play playlist new_playlist" -e "end tell" 2>/dev/null;
515+				if [[ $? -eq 0 ]]; then
516+					opt="play"
517+				else
518+					opt="stop"
519+				fi	
520+                  else
521+                    opt="set allPlaylists to (get name of every playlist)"
522+                  fi
523+                ;;
524 		playing|status)
525 			local state=`osascript -e 'tell application "iTunes" to player state as string'`
526 			if [[ "$state" = "playing" ]]; then
527@@ -250,6 +264,7 @@ EOF
528 			echo "\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer."
529 			echo "\tvol\tSet the volume, takes an argument from 0 to 100"
530 			echo "\tplaying|status\tShow what song is currently playing in iTunes."
531+			echo "\tplaylist [playlist name]\t Play specific playlist"
532 			echo "\thelp\tshow this message and exit"
533 			return 0
534 			;;
535@@ -323,7 +338,7 @@ function spotify() {
536   if [ $# = 0 ]; then
537     showHelp;
538   else
539-    if [ "$(osascript -e 'application "Spotify" is running')" = "false" ]; then
540+    if [ "$1" != "quit" ] && [ "$(osascript -e 'application "Spotify" is running')" = "false" ]; then
541       osascript -e 'tell application "Spotify" to activate'
542       sleep 2
543     fi
544@@ -413,9 +428,13 @@ function spotify() {
545         break ;;
546 
547       "quit"    )
548-        cecho "Quitting Spotify.";
549-        osascript -e 'tell application "Spotify" to quit';
550-        exit 1 ;;
551+        if [ "$(osascript -e 'application "Spotify" is running')" = "false" ]; then
552+          cecho "Spotify was not running."
553+        else
554+          cecho "Closing Spotify.";
555+          osascript -e 'tell application "Spotify" to quit';
556+        fi
557+        break ;;
558 
559       "next"    )
560         cecho "Going to next track." ;
561@@ -470,7 +489,7 @@ function spotify() {
562       "pos"   )
563         cecho "Adjusting Spotify play position."
564         osascript -e "tell application \"Spotify\" to set player position to $2";
565-        break;;
566+        break ;;
567 
568       "status" )
569         showStatus;
570diff --git a/plugins/react-native/README.md b/plugins/react-native/README.md
571index 78bfb68447d674514d8f70009f6cc10f1fad2853..c6fe396b85667520b86fea78a30721bc298c7169 100644
572--- a/plugins/react-native/README.md
573+++ b/plugins/react-native/README.md
574@@ -1,14 +1,26 @@
575-# React Native 
576+# React Native plugin
577 
578-**Maintainer:** [BilalBudhani](https://github.com/BilalBudhani)
579+This plugin adds completion for [`react-native`](https://facebook.github.io/react-native/).
580+It also defines a few [aliases](#aliases) for the commands more frequently used.
581 
582-### List of Aliases
583+To enable, add `react-native` to your `plugins` array in your zshrc file:
584 
585-Alias | React Native command
586-------|---------------------
587-**rnand** | *react-native run-android*
588-**rnios** | *react-native run-ios*
589-**rnios4s** | *react-native run-ios --simulator "iPhone 4s"*
590-**rnios5** | *react-native run-ios --simulator "iPhone 5"*
591-**rnios5s** | *react-native run-ios --simulator "iPhone 5s"*
592+```zsh
593+plugins=(... react-native)
594+```
595 
596+## Aliases
597+
598+| Alias       | React Native command                           |
599+|:------------|:-----------------------------------------------|
600+| **rn**      | `react-native`                                 |
601+| **rns**     | `react-native start`                           |
602+| **rnlink**  | `react-native link`                            |
603+| _App testing_                                                |
604+| **rnand**   | `react-native run-android`                     |
605+| **rnios**   | `react-native run-ios`                         |
606+| **rnios4s** | `react-native run-ios --simulator "iPhone 4s"` |
607+| **rnios5**  | `react-native run-ios --simulator "iPhone 5"`  |
608+| **rnios5s** | `react-native run-ios --simulator "iPhone 5s"` |
609+| **rnios6**  | `react-native run-ios --simulator "iPhone 6"`  |
610+| **rnios6s** | `react-native run-ios --simulator "iPhone 6s"` |
611diff --git a/plugins/react-native/_react-native b/plugins/react-native/_react-native
612index 47ee8c3705b73f5d979b24b295d17f138c990e85..893ac040aed68c54fe72b7ea7eb6840f7c0ce781 100644
613--- a/plugins/react-native/_react-native
614+++ b/plugins/react-native/_react-native
615@@ -3,12 +3,21 @@
616 
617 local -a _1st_arguments
618 _1st_arguments=(
619+    'init:<ProjectName> generates a new project and installs its dependencies'
620+    'android:creates an empty android project'
621     'start:starts the webserver'
622-    'bundle:builds the javascript bundle for offline use'
623-    'new-library:generates a native library bridge'
624-    'android:generates an Android project for your app'
625+    'run-ios:builds your app and starts it on iOS simulator'
626     'run-android:builds your app and starts it on a connected Android emulator or device'
627-    'upgrade:upgrade your apps template files to the latest version; run this after updating the react-native version in your package.json and running npm install'
628+    'new-library:generates a native library bridge'
629+    'bundle:builds the javascript bundle for offline use'
630+    'unbundle:builds javascript as "unbundle" for offline use'
631+    'link:[options] <packageName> links all native dependencies'
632+    'unlink:[options] <packageName> unlink native dependency'
633+    'install:[options] <packageName> install and link native dependencies'
634+    'uninstall:[options] <packageName> uninstall and unlink native dependencies'
635+    "upgrade:upgrade your app's template files to the latest version; run this after updating the react-native version in your package.json and running npm install"
636+    'log-android:starts adb logcat'
637+    'log-ios:starts iOS device syslog tail'
638 )
639 
640 
641diff --git a/plugins/react-native/react-native.plugin.zsh b/plugins/react-native/react-native.plugin.zsh
642index f19cba820c8d5a2ede3b63d676bebc9a7abce546..892a31fbe92add6199cb0ac81008b2c3512c1f0c 100644
643--- a/plugins/react-native/react-native.plugin.zsh
644+++ b/plugins/react-native/react-native.plugin.zsh
645@@ -1,9 +1,11 @@
646+alias rn='react-native'
647+alias rns='react-native start'
648+alias rnlink='react-native link'
649+
650 alias rnand='react-native run-android'
651+alias rnios='react-native run-ios'
652 alias rnios4s='react-native run-ios --simulator "iPhone 4s"'
653 alias rnios5='react-native run-ios --simulator "iPhone 5"'
654 alias rnios5s='react-native run-ios --simulator "iPhone 5s"'
655 alias rnios6='react-native run-ios --simulator "iPhone 6"'
656 alias rnios6s='react-native run-ios --simulator "iPhone 6s"'
657-alias rnios='react-native run-ios'
658-alias rnlink='react-native link'
659-
660diff --git a/plugins/scala/_scala b/plugins/scala/_scala
661index c4ccb37d35fec9fa60887d470187b018995e6091..80434680c0bcd0b948841cc541234af17a27054d 100644
662--- a/plugins/scala/_scala
663+++ b/plugins/scala/_scala
664@@ -152,10 +152,10 @@ Y_opts=(
665   "-Ydump-classes+[Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders)]:output directory:_files -/"
666   "-Yeta-expand-keeps-star[Eta-expand varargs methods to T* rather than Seq[T].  This is a temporary option to ease transition.]"
667   "-Ygen-javap+[Generate a parallel output directory of .javap files]:output directory:_files -/"
668-  "-Yinfer-argument-types[Infer types for arguments of overriden methods]"
669+  "-Yinfer-argument-types[Infer types for arguments of overridden methods]"
670   "-Yinline[Perform inlining when possible]"
671   "-Yinline-handlers[Perform exception handler inlining when possible]"
672-  "-Yinline-warnings[Emit inlining warnings (normally surpressed due to high volume)]"
673+  "-Yinline-warnings[Emit inlining warnings (normally suppressed due to high volume)]"
674   "-Yinvalidate+[Invalidate classpath entry before run]:classpath entry"
675   "-Ylinearizer\:-[Linearizer to use (default\: rpo)]:linearizer:(normal dfs rpo dump)"
676   "-Ylog-classpath[Output information about what classpath is being applied]"
677diff --git a/plugins/suse/suse.plugin.zsh b/plugins/suse/suse.plugin.zsh
678index afd8ecabda5ecaccd66f8a126494f2733ca720c2..f7215528b400817bb4a2896852ae5eadad3ceaf5 100644
679--- a/plugins/suse/suse.plugin.zsh
680+++ b/plugins/suse/suse.plugin.zsh
681@@ -1,4 +1,4 @@
682-#Alias for Zypper according to the offical Zypper's alias
683+#Alias for Zypper according to the official Zypper's alias
684 
685 #Main commands
686 alias z='sudo zypper' #call zypper
687@@ -51,7 +51,7 @@ alias zrr='sudo zypper rr' #remove repositories
688 alias zas='sudo zypper as' #adds a service specified by URI to the system
689 alias zms='sudo zypper ms' #modify properties of specified services
690 alias zrefs='sudo zypper refs' #refreshing a service mean executing the service's special task
691-alias zrs='sudo zypper rs' #remove specified repository index service from the sytem
692+alias zrs='sudo zypper rs' #remove specified repository index service from the system
693 alias zls='sudo zypper ls' #list services defined on the system
694 
695 #Package Locks Management commands
696diff --git a/plugins/terraform/_terraform b/plugins/terraform/_terraform
697index 11740dc4819cbda50cfb63dfda7ca14e16831f1d..97c42a559a79dee0fd69f6ce06c2efa1d45b22f9 100644
698--- a/plugins/terraform/_terraform
699+++ b/plugins/terraform/_terraform
700@@ -98,7 +98,7 @@ __push() {
701         '-token=[(token) Atlas API token to use to authorize the upload. If blank or unspecified, the ATLAS_TOKEN environmental variable will be used.]' \
702         '-var=[("foo=bar") Set the value of a variable for the Terraform configuration.]' \
703         '-var-file=[(foo) Set the value of variables using a variable file.]' \
704diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md
705index c9ef61f4e4a76d6969cb33e2f516afb10b674c38..5ad4bbcd289ebdff6ce893cf6cfc8d7a5c4fbdee 100644
706--- a/plugins/ubuntu/readme.md
707+++ b/plugins/ubuntu/readme.md
708@@ -10,7 +10,7 @@ By now you already can guess almost all aliases
709 
710 There are two exeptions since ...  
711 agu  = sudo Apt-Get Update  - we have ...  
712-agug = sudo Apt-Get UpGrade - as the exeptional 4 letter alias for a single command.
713+agug = sudo Apt-Get UpGrade - as the exceptional 4 letter alias for a single command.
714 
715 afs = Apt-File Search --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command.
716 
717diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh
718index 030af069389cf233ccd51892d4cd6d62483477c6..60ff0457f9f8ff2ee10a922e37377105d8826f89 100644
719--- a/plugins/ubuntu/ubuntu.plugin.zsh
720+++ b/plugins/ubuntu/ubuntu.plugin.zsh
721@@ -69,7 +69,7 @@ alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc'
722 # apt-add-repository with automatic install/upgrade of the desired package
723 # Usage: aar ppa:xxxxxx/xxxxxx [packagename]
724 # If packagename is not given as 2nd argument the function will ask for it and guess the default by taking
725-# the part after the / from the ppa name wich is sometimes the right name for the package you want to install
726+# the part after the / from the ppa name which is sometimes the right name for the package you want to install
727 aar() {
728 	if [ -n "$2" ]; then
729 		PACKAGE=$2
730diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
731index 3b5478ca2bba11128ca04ff65c7d29eb741753c9..cc970e5fd594b80a264a9b47f0cacbbfa1f38214 100644
732--- a/plugins/web-search/web-search.plugin.zsh
733+++ b/plugins/web-search/web-search.plugin.zsh
734@@ -15,6 +15,7 @@ function web_search() {
735     github      "https://github.com/search?q="
736     baidu       "https://www.baidu.com/s?wd="
737     ecosia      "https://www.ecosia.org/search?q="
738+    goodreads   "https://www.goodreads.com/search?q="
739   )
740 
741   # check whether the search engine is supported
742@@ -47,6 +48,7 @@ alias yandex='web_search yandex'
743 alias github='web_search github'
744 alias baidu='web_search baidu'
745 alias ecosia='web_search ecosia'
746+alias goodreads='web_search goodreads'
747 
748 #add your own !bang searches here
749 alias wiki='web_search duckduckgo \!w'
750diff --git a/plugins/z/README b/plugins/z/README
751index 7de82a4c7a506f4a2764e6cf048aba7f7673eeeb..56261cff4f613d49f0e3407c34e8e222b3f682d0 100644
752--- a/plugins/z/README
753+++ b/plugins/z/README
754@@ -125,7 +125,7 @@ ENVIRONMENT
755        Directories must be full paths without trailing slashes.
756 
757        The  environment  variable  $_Z_OWNER  can  be set to your username, to
758-       allow usage of z when your sudo enviroment keeps $HOME set.
759+       allow usage of z when your sudo environment keeps $HOME set.
760 
761 FILES
762        Data is stored in $HOME/.z. This  can  be  overridden  by  setting  the
763diff --git a/plugins/z/z.1 b/plugins/z/z.1
764index cc99910bf6cf1e946b2987303b6a695377b352b7..bbc1bf5df046a4cd761b4d6d9209f4b06926c45d 100644
765--- a/plugins/z/z.1
766+++ b/plugins/z/z.1
767@@ -151,7 +151,7 @@ directory trees to exclude from tracking. \fB$HOME\fR is always excluded.
768 Directories must be full paths without trailing slashes.
769 .P
770 The environment variable \fB$_Z_OWNER\fR can be set to your username, to
771-allow usage of \fBz\fR when your sudo enviroment keeps \fB$HOME\fR set.
772+allow usage of \fBz\fR when your sudo environment keeps \fB$HOME\fR set.
773 .SH
774 FILES
775 Data is stored in \fB$HOME/.z\fR. This can be overridden by setting the
776diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
777index 97d142a0feeb0023520c639b994715b07c846edf..1c6d1732ccd5527ec31da99cffecaf8dd47b99d0 100644
778--- a/themes/af-magic.zsh-theme
779+++ b/themes/af-magic.zsh-theme
780@@ -27,7 +27,7 @@ else
781 fi
782 
783 # git settings
784-ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:"
785+ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075]($FG[078]"
786 ZSH_THEME_GIT_PROMPT_CLEAN=""
787 ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
788 ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
789diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme
790index a3c50570626f8011d4677925ace04929788d4041..5f987099d4cede1078e3640492ca0062c922a982 100644
791--- a/themes/half-life.zsh-theme
792+++ b/themes/half-life.zsh-theme
793@@ -17,7 +17,7 @@ setopt prompt_subst
794 autoload -U add-zsh-hook
795 autoload -Uz vcs_info
796 
797-#use extended color pallete if available
798+#use extended color palette if available
799 if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
800     turquoise="%F{81}"
801     orange="%F{166}"
802diff --git a/themes/pure.zsh-theme b/themes/pure.zsh-theme
803index 1473194a51e465829fd643cdd7dacee327b638dd..0e5681cc7f887bb0e80f5dd708c6ab85e31c5de1 100644
804--- a/themes/pure.zsh-theme
805+++ b/themes/pure.zsh-theme
806@@ -61,7 +61,7 @@ cmd_exec_time() {
807     [ $elapsed -gt 5 ] && echo ${elapsed}s
808 }
809 
810-# Get the intial timestamp for cmd_exec_time
811+# Get the initial timestamp for cmd_exec_time
812 #
813 preexec() {
814     cmd_timestamp=`date +%s`
815diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
816index 13dc3ad2f263c8c51016a8e8de5caf9976ccebf9..b72a41c92262b9d04cc3302b4e6e73852c6c6802 100644
817--- a/themes/steeef.zsh-theme
818+++ b/themes/steeef.zsh-theme
819@@ -19,7 +19,7 @@ setopt prompt_subst
820 autoload -U add-zsh-hook
821 autoload -Uz vcs_info
822 
823-#use extended color pallete if available
824+#use extended color palette if available
825 if [[ $terminfo[colors] -ge 256 ]]; then
826     turquoise="%F{81}"
827     orange="%F{166}"
828diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme
829index ca1676fb5c85df410d2228fdebe4d680091f7b0e..3fa5d57ab99b1c4bb39945c9e2cee2c956ebe8ba 100644
830--- a/themes/trapd00r.zsh-theme
831+++ b/themes/trapd00r.zsh-theme
832@@ -36,7 +36,7 @@ local c12=$(printf "\e[38;5;142m\e[1m")
833 local c13=$(printf "\e[38;5;196m\e[1m")
834 
835 
836-# We dont want to use the extended colorset in the TTY / VC.
837+# We don't want to use the extended colorset in the TTY / VC.
838 if [ "$TERM" = "linux" ]; then
839     c1=$( printf "\e[34;1m")
840     c2=$( printf "\e[35m")
841@@ -71,7 +71,7 @@ prompt_jnrowe_precmd () {
842     PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
843 > '
844 
845-# modified, to be commited
846+# modified, to be committed
847   elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
848     dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
849     PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}