Commit 238d8e65a1eb2d20db0cfd84bf647b2cbfd188f0

Authored by mj
1 parent 3de415e652
Exists in master and in 2 other branches 02-merge, dev

Squashed 'repos/robbyrussell/oh-my-zsh/' changes from 1400346..599831b

599831b Merge pull request #4058 from ncanceill/plugin-git
d24196c git plugin: fix ggl to avoid empty string see https://github.com/robbyrussell/oh-my-zsh/pull/2790#issuecomment-112716330
ed6645a Fix plugin/git ggpull and ggpush backward compatibility
ab18795 Merge pull request #4002 from aliafshar/patch-1
f66a54f Add missing space causing parse error.
8921902 Merge pull request #3852 from sachin21/add_alias_of_bundle_clean
5d214af Merge pull request #3858 from muchweb/muchweb-patch-1-editor
7daf740 Merge pull request #3874 from diraol/patch-2
0665ece Merge pull request #3973 from moul/pr-boot2docker-update
31b351c Merge pull request #3947 from mkwmms/patch-1
0a8ca6a Merge pull request #3918 from cbazin/master
b55effd Merge pull request #3919 from delphij/history-extendedglob
34d3680 Merge pull request #3838 from forivall/hyphen-insensitive
3a57076 Merge pull request #3813 from ziegs/fix_gradle_tasks
628c1fe Merge pull request #3848 from tristola/master
058def3 Merge pull request #3798 from dnixx/vundle-update
5fba46a Merge pull request #3821 from tresni/fix_minimal
c0b283c Merge pull request #3833 from coopermaruyama/master
6a340d9 Merge pull request #3988 from UserTaken/docker_update
ea5ff03 Merge pull request #3759 from mikeokner/master
04c301b Merge pull request #3975 from wernerb/patch-1
a1e722d Merge pull request #3976 from rodrigoargumedo/patch-1
422db48 Merge pull request #3986 from evilhamsterman/master
3d2bf22 Merge pull request #4001 from ivanfoo/fixOddCharsOnMac
a778463 Merge pull request #3929 from GunfighterJ/GunfighterJ-patch-sublime3
78bbf7a Merge pull request #3809 from ncanceill/easymerge
c6460ef Fixed odd chars on mac for agnoster theme
a7e7982 Add mix-fast plugin (similar to rake-fast)
55b1a2b Update _docker
3d670c0 Adding quotes to git completion discovery path
4cc0a26 A paver (Python build and configuration utility) plugin
26c7adf Revert "Added migration notification for rails plugin"
8b95bdb Added github in web_search plugin.
83295ec last-working-dir working with spaces in dirnames
d0b690b use local options to set no_equals before sourcing bash completion script
9eaf511 Merge pull request #3990 from ncanceill/plugin-git
f1a43da git plugin: new/changed aliases gaa was brought back by popular demand — see #3535 gap was replaced with gapa — see #3682 gdc was replaced with gdca — see #3977
e55d84f Add reference to bundler plugin issue in README
763cef8 Add `leaves` command to `brew` completion
4b76b74 remove trash command from osx plugin
cf3fb87 Added README.md file for ForkLift plugin
81da076 Added README.md file for atom plugin
a2d7d36 Added README.md file
c28b226 Fix README.md for sst command
0e35bd4 Plugins: vi-mode: Add first README file
0f96e8e Plugins: archlinux - add basic README.
e592968 Plugins: archlinux - use command -v in favor of which
e0ce876 Plugins: apache2-macports - add README
3f92985 Added references to the `external themes` wiki page.
8eb31a6 git plugin: fix ggpnp when called without argument also allow multiple arguments for ggp and ggl aliases
81eec40 * Added header with help and information * Moved git information to left prompt, with   support for:     * +ZSH_THEME_GIT_PROMPT_UNTRACKED, MODIFIED,     STASHED, ADDED, UPSTREAM STATUS     (if applicable) * Removed right prompt * Refactored following Google's guidelines for   scripts [ http://goo.gl/oJSXH2 ]     * Using local variables where applicable
1f008b4 Update Mix complition upto 1.0.4
02c2b74 Update aliases in laravel5.plugin.zsh file
266894c Update taskwarrior.plugin.zsh
1a4dc0d Renamed 'ss' alias to 'sstat' (to avoid collision with /bin/ss).
69dee65 Fixed typo in README
8791d7e Update bgnotify.plugin.zsh
980528f fix typo
af4ffe5 adb: add more commands
c838b9a Update README.markdown
fb5b83d Fixed jump pluging to display the right mark name on 'mark . '
563e105 Added README for mercurial plugin
4ab4300 Add git to prerequisites
23ac32d add help link to install zsh
4c409b0 sublime: Make subl a function so it can be called from functions in other modules
e8ac8b9 Added support for detecting Sublime Text 3 on Arch Linux
6bec3c6 Update history-substring-search README
83c3316 Added the tugboat autocompletion plugin
f513999 git plugin: make b local in gg* functions because it leaked, and led to #3991
6ff96da git plugin: fix error msg in gwip alias because git rm will fail when no files were deleted
6c29041 git plugin: global var for git command due to issues like #3962 until a proper plugin-loading system is implemented
a570f4b git plugin: bring back olg gg aliases by popular demand, see #3972
557dc09 More run and create options
2fb3265 Only load url-quote-magic if it is available. Partially fixes #3614
25df9f3 Disable globbing when executing `zeus rake` aliases to enable use of square brackets without escaping
2d40cc0 Add git_prompt_behind and git_prompt_exists
f21a672 add kitchen completion plugin from @petere
70c4a27 Added a possibility to display the remote branch and the number of commits you are ahead or behind
41104f8 Fix homebrew directory in aws plugin.
1653545 Recognize comments by default.
a28dbc8 Move custon *.zsh file sourcing up so that they can load plugins and other things that come after.
8652fd6 added comment functionality
de56943 Improved the `_git_time_since_commit` function.
729b19c Remove docker insert command
45e3f62 Add README for httpie plugin
3cc3084 Fix typo in $VCS_CLEAN_COLOR in adben theme
a98501d Grep bug in Agnoster
d686f8a generate with 'pod --completion-script' /cc thx to @ajmccall
a2f782e updated the command list to the latest cocoapod version (0.33.0)
6a1b832 No input for Update Check defaults to Yes
b7d041c Add rdrs method to reset the database(s)
5770ad5 Set AWS_PROFILE and use existing RPROMPT
3a77433 Add new boot2docker options
4224c2a Merge pull request #3494 from AlexTalker/short-host
51e366e Merge pull request #3339 from Xophmeister/master
4c21557 Merge pull request #3320 from moul/pr-boot2docker
3e88e53 Merge pull request #2999 from nicorevin/master
dac07b2 Merge pull request #2736 from felipec/fc/gitfast
35c7b7b Merge pull request #1951 from Neal/extract-ipsw
cb89fcd Merge pull request #2836 from ptamarit/chsh-etc-shells
11c7baf Merge pull request #3651 from mcornella/batch-close-3
a449d53 Merge pull request #2790 from ncanceill/plugin-git
da21092 Merge pull request #3945 from nicolas-brousse/homebrew-plugin
1b625af Merge pull request #3952 from lbraun/patch-1
cffeefd Add installation instructions to README
cc63928 Round 3 of batch-closing obsolete issues
7f232f6 Respect $ZSH_CACHE_DIR when creating fasd's cache
9c75551 Merge pull request #3887 from jadb/add-cakephp3-plugin
7416018 Create new aliases for homebrew plugin
0c8cb11 Add sublime text 3 paths to check list
743be91 Don't leak extendedglob to global environment.
7b478d7 Detect the .venv in any parent directory of the current directory
6504a2d Add CakePHP3 plugin
4d0aca4 Differing upgrade and safe-upgrade
5b75cc7 Many updates to git plugin (see #2790)
9a5e1a0 Use $EDITOR
03b8c19 Fix 'chsh' by checking '/etc/shells' instead of using 'which'
d60d4f6 Add alias of bundle clean
83cf909 Added aliases for docker compose
d80918b add markdown extension to README
24552f0 Add readme and add new alias cfpc: paste+compile+copy
4512161 Update template zshrc with HYPHEN_INSENSITIVE
a315ddc typofix
8e8cdc0 Add coffeescript aliases: cf, cfc, cfp
66052e2 Add hyphen insensitivity
5c9c373 Fix minimal.zsh-theme's check for in_svn and add support for mercurial
551d68a Fixes gradle autocomplete. Regex did not include subproject tasks before.
7f0b577 Use the newest Vundle commands
8cf04ed Fix echo nothing if $SHORT_HOST doesn't exist.
f1d12c5 Add .ipsw to the extract plugin.
663d432 Minor cosmetic fix to minimal theme
95d5f2c [boot2docker plugin] Initial version
8a43d35 fix paclist() for non-english locales
5918d91 gitfast: back-port prompt fix
6a5c8fb gitfast: update to upstream v1.9.2

git-subtree-dir: repos/robbyrussell/oh-my-zsh
git-subtree-split: 599831b85a5fd4564ab820530e2bb45f37ca3f99

Showing 79 changed files with 2018 additions and 935 deletions Side-by-side Diff

... ... @@ -15,9 +15,9 @@ To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com
15 15 __Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._
16 16  
17 17 * Unix-based operating system (Mac OS X or Linux)
18   -* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent)
19   - * This is commonly pre-installed. (`zsh --version` to confirm)
  18 +* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing-ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
20 19 * `curl` or `wget` should be installed
  20 +* `git` should be installed
21 21  
22 22 ### Basic Installation
23 23  
... ... @@ -25,11 +25,11 @@ Oh My Zsh is installed by running one of the following commands in your terminal
25 25  
26 26 #### via curl
27 27  
28   -`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh`
  28 +`sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"`
29 29  
30 30 #### via wget
31 31  
32   -`wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh`
  32 +`sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"`
33 33  
34 34 ## Using Oh My Zsh
35 35  
... ... @@ -51,7 +51,7 @@ Most plugins (should! we're working on this) include a __README__, which documen
51 51  
52 52 ### Themes
53 53  
54   -We'll admit it. Early in the Oh My Zsh world... we may have gotten a far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out!
  54 +We'll admit it. Early in the Oh My Zsh world... we may have gotten far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out!
55 55  
56 56 #### Selecting a Theme
57 57  
... ... @@ -67,6 +67,8 @@ To use a different theme, simple change the value to match the name of your desi
67 67  
68 68 Open up a new terminal window and your prompt should look something like...
69 69  
  70 +In case you did not find a suitable theme for your needs, please have a look at the wiki for [more themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes).
  71 +
70 72 ## Advanced Topics
71 73  
72 74 If you're the type that likes to get their hands dirty... these sections might resonate.
... ... @@ -154,7 +156,7 @@ We also need people to test out pull-requests. So take a look through [the open
154 156  
155 157 ### Do NOT Send Us Themes
156 158  
157   -We have (more than) enough themes for the time being. Please fork the project and add one in there – you can let people know how to grab it from there.
  159 +We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page.
158 160  
159 161 ## Contributors
160 162  
... ... @@ -15,7 +15,12 @@ if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
15 15 zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
16 16 unset CASE_SENSITIVE
17 17 else
18   - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
  18 + if [ "x$HYPHEN_INSENSITIVE" = "xtrue" ]; then
  19 + zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
  20 + unset HYPHEN_INSENSITIVE
  21 + else
  22 + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
  23 + fi
19 24 fi
20 25  
21 26 zstyle ':completion:*' list-colors ''
... ... @@ -36,24 +36,27 @@ git_remote_status() {
36 36 ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
37 37 behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
38 38  
39   - if [ $ahead -eq 0 ] && [ $behind -gt 0 ]
  39 + if [ $ahead -gt 0 ] && [ $behind -eq 0 ]
40 40 then
41   - echo "$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
42   - elif [ $ahead -gt 0 ] && [ $behind -eq 0 ]
  41 + git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
  42 + git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"
  43 + elif [ $behind -gt 0 ] && [ $ahead -eq 0 ]
43 44 then
44   - echo "$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
  45 + git_remote_status="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
  46 + git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
45 47 elif [ $ahead -gt 0 ] && [ $behind -gt 0 ]
46 48 then
47   - echo "$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
  49 + git_remote_status="$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
  50 + git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
48 51 fi
49   - fi
50   -}
51 52  
52   -# Checks if there are commits ahead from remote
53   -function git_prompt_ahead() {
54   - if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
55   - echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
56   - fi
  53 + if [ $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]
  54 + then
  55 + git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX"
  56 + fi
  57 +
  58 + echo $git_remote_status
  59 + fi
57 60 }
58 61  
59 62 # Gets the number of commits ahead from remote
... ... @@ -64,6 +67,29 @@ function git_commits_ahead() {
64 67 fi
65 68 }
66 69  
  70 +# Outputs if current branch is ahead of remote
  71 +function git_prompt_ahead() {
  72 + if [[ -n "$(command git rev-list origin/$(current_branch)..HEAD 2> /dev/null)" ]]; then
  73 + echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
  74 + fi
  75 +}
  76 +
  77 +# Outputs if current branch is behind remote
  78 +function git_prompt_behind() {
  79 + if [[ -n "$(command git rev-list HEAD..origin/$(current_branch) 2> /dev/null)" ]]; then
  80 + echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
  81 + fi
  82 +}
  83 +
  84 +# Outputs if current branch exists on remote or not
  85 +function git_prompt_remote() {
  86 + if [[ -n "$(command git show-ref origin/$(current_branch) 2> /dev/null)" ]]; then
  87 + echo "$ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS"
  88 + else
  89 + echo "$ZSH_THEME_GIT_PROMPT_REMOTE_MISSING"
  90 + fi
  91 +}
  92 +
67 93 # Formats prompt string for current git commit short SHA
68 94 function git_prompt_short_sha() {
69 95 SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
1   -## smart urls
2   -autoload -U url-quote-magic
3   -zle -N self-insert url-quote-magic
  1 +## Load smart urls if available
  2 +for d in $fpath; do
  3 + if [[ -e "$d/url-quote-magic" ]]; then
  4 + autoload -U url-quote-magic
  5 + zle -N self-insert url-quote-magic
  6 + fi
  7 +done
4 8  
5 9 ## jobs
6 10 setopt long_list_jobs
... ... @@ -20,3 +24,6 @@ alias afind='ack-grep -il'
20 24 if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
21 25 export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
22 26 fi
  27 +
  28 +# recognize comments
  29 +setopt interactivecomments
... ... @@ -14,7 +14,7 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
14 14 ZSH_CUSTOM="$ZSH/custom"
15 15 fi
16 16  
17   -# Set ZSH_CACHE_DIR to the path where cache files sould be created
  17 +# Set ZSH_CACHE_DIR to the path where cache files should be created
18 18 # or else we will use the default cache/
19 19 if [[ -z "$ZSH_CACHE_DIR" ]]; then
20 20 ZSH_CACHE_DIR="$ZSH/cache/"
... ... @@ -29,6 +29,11 @@ for config_file ($ZSH/lib/*.zsh); do
29 29 source $config_file
30 30 done
31 31  
  32 +# Load all of your custom configurations from custom/
  33 +for config_file ($ZSH_CUSTOM/*.zsh(N)); do
  34 + source $config_file
  35 +done
  36 +unset config_file
32 37  
33 38 is_plugin() {
34 39 local base_dir=$1
... ... @@ -72,12 +77,6 @@ for plugin ($plugins); do
72 77 fi
73 78 done
74 79  
75   -# Load all of your custom configurations from custom/
76   -for config_file ($ZSH_CUSTOM/*.zsh(N)); do
77   - source $config_file
78   -done
79   -unset config_file
80   -
81 80 # Load the theme
82 81 if [ "$ZSH_THEME" = "random" ]; then
83 82 themes=($ZSH/themes/*zsh-theme)
... ... @@ -16,14 +16,22 @@ _1st_arguments=(
16 16 'help:show the help message'
17 17 'install:push this package file to the device and install it'
18 18 'jdwp:list PIDs of processes hosting a JDWP transport'
19   -'logcat:View device log'
  19 +'kill-server:kill the server if it is running'
  20 +'logcat:view device log'
20 21 'pull:copy file/dir from device'
21 22 'push:copy file/dir to device'
  23 +'reboot:reboots the device, optionally into the bootloader or recovery program'
  24 +'reboot-bootloader:reboots the device into the bootloader'
  25 +'remount:remounts the partitions on the device read-write'
  26 +'root:restarts the adbd daemon with root permissions'
  27 +'sideload:push a ZIP to device and install it'
22 28 'shell:run remote shell interactively'
23 29 'sync:copy host->device only if changed (-l means list but dont copy)'
24   -‘tcpip:restart host adb in tcpip mode’
  30 +'start-server:ensure that there is a server running'
  31 +'tcpip:restart host adb in tcpip mode'
25 32 'uninstall:remove this app package from the device'
26 33 'version:show version num'
  34 +'wait-for-device:block until device is online'
27 35 )
28 36  
29 37 local expl
plugins/apache2-macports/README.md
... ... @@ -0,0 +1,19 @@
  1 +## APACHE2 MACPORTS PLUGIN
  2 +
  3 +
  4 +---
  5 +
  6 +### FEATURES
  7 +
  8 +| Alias | Function | Description |
  9 +|:--------------:|:-------------------------------------------------------------------------------|----------------------:|
  10 +| apache2restart | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart | Restart apache daemon |
  11 +| apache2start | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start | Start apache daemon |
  12 +| apache2stop | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop | Stop apache daemon |
  13 +
  14 +---
  15 +
  16 +### CONTRIBUTORS
  17 + - Alexander Rinass (alex@rinass.net)
  18 +
  19 +---
plugins/archlinux/README.md
... ... @@ -0,0 +1,64 @@
  1 +## ARCHLINUX PLUGIN
  2 +
  3 +
  4 +---
  5 +
  6 +### FEATURES
  7 +
  8 +| Alias | Function | Description |
  9 +|:------------:|-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
  10 +| pacin | sudo pacman -S | Install specific package(s) from the repositories |
  11 +| pacins | sudo pacman -U | Install specific package not from the repositories but from a file |
  12 +| pacinsd | sudo pacman -S --asdeps | Install given package(s) as dependencies of another package |
  13 +| pacloc | pacman -Qi | Display information about a given package in the local database |
  14 +| paclocs | pacman -Qs | Search for package(s) in the local database |
  15 +| paclsorphans | sudo pacman -Qdt' | List all orphaned packages |
  16 +| pacmir | sudo pacman -Syy | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist |
  17 +| pacre | sudo pacman -R | Remove the specified package(s), retaining its configuration(s) and required dependencies |
  18 +| pacrem | sudo pacman -Rns | Remove the specified package(s), its configuration(s) and unneeded dependencies |
  19 +| pacrep | pacman -Si | Display information about a given package in the repositories |
  20 +| pacreps | pacman -Ss | Search for package(s) in the repositories |
  21 +| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq)' | Delete all orphaned packages |
  22 +| pacupd | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories |
  23 +| pacupd | sudo pacman -Sy && sudo abs | Update and refresh the local package and ABS databases against repositories |
  24 +| pacupd | sudo pacman -Sy && sudo aur | Update and refresh the local package and AUR databases against repositories |
  25 +| pacupd | sudo pacman -Sy | Update and refresh the local package database against repositories |
  26 +| pacupg | sudo pacman -Syu | Synchronize with repositories before upgrading packages that are out of date on the local system. |
  27 +| yaconf | yaourt -C | Fix all configuration files with vimdiff |
  28 +| yain | yaourt -S | Install specific package(s) from the repositories |
  29 +| yains | yaourt -U | Install specific package not from the repositories but from a file |
  30 +| yainsd | yaourt -S --asdeps | Install given package(s) as dependencies of another package |
  31 +| yaloc | yaourt -Qi | Display information about a given package in the local database |
  32 +| yalocs | yaourt -Qs | Search for package(s) in the local database |
  33 +| yalst | yaourt -Qe | List installed packages, even those installed from AUR (they're tagged as "local") |
  34 +| yamir | yaourt -Syy | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist |
  35 +| yaorph | yaourt -Qtd | Remove orphans using yaourt |
  36 +| yare | yaourt -R | Remove the specified package(s), retaining its configuration(s) and required dependencies |
  37 +| yarem | yaourt -Rns | Remove the specified package(s), its configuration(s) and unneeded dependencies |
  38 +| yarep | yaourt -Si | Display information about a given package in the repositories |
  39 +| yareps | yaourt -Ss | Search for package(s) in the repositories |
  40 +| yasu | yaourt --sucre | Same as yaupg, but without confirmation |
  41 +| yaupd | yaourt -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories |
  42 +| yaupd | yaourt -Sy && sudo abs | Update and refresh the local package and ABS databases against repositories |
  43 +| yaupd | yaourt -Sy && sudo aur | Update and refresh the local package and AUR databases against repositories |
  44 +| yaupd | yaourt -Sy | Update and refresh the local package database against repositories |
  45 +| yaupg | yaourt -Syua | Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system |
  46 +
  47 +| Function | Description |
  48 +|----------------|:------------------------------------------------------------------------------------------------------------------|
  49 +| pacdisowned | List all disowned files in your system |
  50 +| paclist | List all installed packages with a short description - [Source](https://bbs.archlinux.org/viewtopic.php?id=93683) |
  51 +| pacmanallkeys | Get all keys for developers and trusted users |
  52 +| pacmansignkeys | |
  53 +
  54 +---
  55 +
  56 +### CONTRIBUTORS
  57 + - Benjamin Boudreau - dreurmail@gmail.com
  58 + - Celso Miranda - contacto@celsomiranda.net
  59 + - KhasMek - Boushh@gmail.com
  60 + - Martin Putniorz - mputniorz@gmail.com
  61 + - MatthR3D - matthr3d@gmail.com
  62 + - ornicar - thibault.duplessis@gmail.com
  63 +
  64 +---
plugins/archlinux/archlinux.plugin.zsh
... ... @@ -2,7 +2,7 @@
2 2 # Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
3 3  
4 4 # Look for yaourt, and add some useful functions if we have it.
5   -if [[ -x `which yaourt` ]]; then
  5 +if [[ -x `command -v yaourt` ]]; then
6 6 upgrade () {
7 7 yaourt -Syu
8 8 }
... ... @@ -21,11 +21,11 @@ if [[ -x `which yaourt` ]]; then
21 21 alias yalst='yaourt -Qe' # List installed packages, even those installed from AUR (they're tagged as "local")
22 22 alias yaorph='yaourt -Qtd' # Remove orphans using yaourt
23 23 # Additional yaourt alias examples
24   - if [[ -x `which abs` && -x `which aur` ]]; then
  24 + if [[ -x `command -v abs` && -x `command -v aur` ]]; then
25 25 alias yaupd='yaourt -Sy && sudo abs && sudo aur' # Update and refresh the local package, ABS and AUR databases against repositories
26   - elif [[ -x `which abs` ]]; then
  26 + elif [[ -x `command -v abs` ]]; then
27 27 alias yaupd='yaourt -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
28   - elif [[ -x `which aur` ]]; then
  28 + elif [[ -x `command -v aur` ]]; then
29 29 alias yaupd='yaourt -Sy && sudo aur' # Update and refresh the local package and AUR databases against repositories
30 30 else
31 31 alias yaupd='yaourt -Sy' # Update and refresh the local package database against repositories
... ... @@ -49,11 +49,11 @@ alias pacreps='pacman -Ss' # Search for package(s) in the repositori
49 49 alias pacloc='pacman -Qi' # Display information about a given package in the local database
50 50 alias paclocs='pacman -Qs' # Search for package(s) in the local database
51 51 # Additional pacman alias examples
52   -if [[ -x `which abs` && -x `which aur` ]]; then
  52 +if [[ -x `command -v abs` && -x `command -v aur` ]]; then
53 53 alias pacupd='sudo pacman -Sy && sudo abs && sudo aur' # Update and refresh the local package, ABS and AUR databases against repositories
54   -elif [[ -x `which abs` ]]; then
  54 +elif [[ -x `command -v abs` ]]; then
55 55 alias pacupd='sudo pacman -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
56   -elif [[ -x `which aur` ]]; then
  56 +elif [[ -x `command -v aur` ]]; then
57 57 alias pacupd='sudo pacman -Sy && sudo aur' # Update and refresh the local package and AUR databases against repositories
58 58 else
59 59 alias pacupd='sudo pacman -Sy' # Update and refresh the local package database against repositories
... ... @@ -63,7 +63,7 @@ alias pacmir='sudo pacman -Syy' # Force refresh of all package li
63 63  
64 64 # https://bbs.archlinux.org/viewtopic.php?id=93683
65 65 paclist() {
66   - sudo pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf(" pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'33[1;36m%s pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'33[1;37m", $2)}/^Description/{print $2}'
  66 + LC_ALL=C pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf(" pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'33[1;36m%s pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'33[1;37m", $2)}/^Description/{print $2}'
67 67 }
68 68  
69 69 alias paclsorphans='sudo pacman -Qdt'
plugins/atom/README.md
... ... @@ -0,0 +1,17 @@
  1 +## atom
  2 +
  3 +Plugin for Atom, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.
  4 +
  5 +### Requirements
  6 +
  7 + * [Atom](https://atom.io/)
  8 +
  9 +### Usage
  10 +
  11 + * If `at` command is called without an argument, launch Atom
  12 +
  13 + * If `at` is passed a directory, `cd` to it and open it in Atom
  14 +
  15 + * If `at` is passed a file, open it in Atom
  16 +
  17 + * if `att` command is called, it is equivalent to `at .`, opening the current folder in Atom
plugins/aws/aws.plugin.zsh
... ... @@ -13,7 +13,8 @@ function agp {
13 13 }
14 14 function asp {
15 15 export AWS_DEFAULT_PROFILE=$1
16   - export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
  16 + export AWS_PROFILE=$1
  17 + export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$RPROMPT"
17 18 }
18 19 function aws_profiles {
19 20 reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
... ... @@ -22,7 +23,7 @@ function aws_profiles {
22 23 compctl -K aws_profiles asp
23 24  
24 25 if _homebrew-installed && _awscli-homebrew-installed ; then
25   - _aws_zsh_completer_path=$(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh
  26 + _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh
26 27 else
27 28 _aws_zsh_completer_path=$(which aws_zsh_completer.sh)
28 29 fi
plugins/bgnotify/bgnotify.plugin.zsh
... ... @@ -33,9 +33,9 @@ bgnotify () {
33 33 if hash terminal-notifier 2>/dev/null; then #osx
34 34 terminal-notifier -message "$2" -title "$1"
35 35 elif hash growlnotify 2>/dev/null; then #osx growl
36   - growlnotify -m $1 $2
  36 + growlnotify -m "$1" "$2"
37 37 elif hash notify-send 2>/dev/null; then #ubuntu!
38   - notify-send $1 $2
  38 + notify-send "$1" "$2"
39 39 elif hash notifu 2>/dev/null; then #cygwyn support!
40 40 notifu /m "$2" /p "$1"
41 41 fi
plugins/boot2docker/README.md
... ... @@ -0,0 +1,6 @@
  1 +## Boot2docker autocomplete plugin
  2 +
  3 +- Adds autocomplete options for all boot2docker commands.
  4 +
  5 +
  6 +Maintainer : Manfred Touron ([@moul](https://github.com/moul))
plugins/boot2docker/_boot2docker
... ... @@ -0,0 +1,73 @@
  1 +#compdef boot2docker
  2 +
  3 +# Boot2docker autocompletion for oh-my-zsh
  4 +# Requires: Boot2docker installed
  5 +# Author: Manfred Touron (@moul)
  6 +
  7 +local -a _1st_arguments
  8 +_1st_arguments=(
  9 + "init":"Create a new Boot2Docker VM."
  10 + "up":"Start VM from any states."
  11 + "start":"Start VM from any states."
  12 + "boot":"Start VM from any states."
  13 + "ssh":"[ssh-command] Login to VM via SSH."
  14 + "save":"Suspend VM and save state to disk."
  15 + "suspend":"Suspend VM and save state to disk."
  16 + "down":"Gracefully shutdown the VM."
  17 + "stop":"Gracefully shutdown the VM."
  18 + "halt":"Gracefully shutdown the VM."
  19 + "restart":"Gracefully reboot the VM."
  20 + "poweroff":"Forcefully power off the VM (may corrupt disk image)."
  21 + "reset":"Forcefully power cycle the VM (may corrupt disk image)."
  22 + "delete":"Delete Boot2Docker VM and its disk image."
  23 + "destroy":"Delete Boot2Docker VM and its disk image."
  24 + "config":"Show selected profile file settings."
  25 + "cfg":"Show selected profile file settings."
  26 + "info":"Display detailed information of VM."
  27 + "ip":"Display the IP address of the VM's Host-only network."
  28 + "socket":"Display the DOCKER_HOST socket to connect to."
  29 + "shellinit":"Display the shell command to set up the Docker client."
  30 + "status":"Display current state of VM."
  31 + "download":"Download Boot2Docker ISO image."
  32 + "upgrade":"Upgrade the Boot2Docker ISO image (restart if running)."
  33 + "version":"Display version information."
  34 +)
  35 +
  36 +_arguments \
  37 + '(--basevmdk)--basevmdk[Path to VMDK to use as base for persistent partition]' \
  38 + '(--cpus)'{-c,--cpus}'[number of CPUs for boot2docker.]' \
  39 + '(--clobber)--clobber[overwrite Docker client binary on boot2docker upgrade]' \
  40 + '(--dhcp)--dhcp[enable VirtualBox host-only network DHCP.]' \
  41 + '(--dhcpip)--dhcpip[VirtualBox host-only network DHCP server address.]' \
  42 + '(-s --disksize)'{-s,--disksize}'[boot2docker disk image size (in MB).]' \
  43 + '(--dockerport)--dockerport[host Docker port (forward to port 2376 in VM). (deprecated - use with care)]' \
  44 + '(--driver)--driver[hypervisor driver.]' \
  45 + '(--force-upgrade-download)--force-upgrade-download[always download on boot2docker upgrade, never skip.]' \
  46 + '(--hostip)--hostip[VirtualBox host-only network IP address.]' \
  47 + '(--iso)--iso[path to boot2docker ISO image.]' \
  48 + '(--iso-url)--iso-url[/api.github.com/repos/boot2docker/boot2docker/releases": source URL to provision the boot2docker ISO image.]' \
  49 + '(--lowerip)--lowerip[VirtualBox host-only network DHCP lower bound.]' \
  50 + '(--memory)'{-m,--memory}'[virtual machine memory size (in MB).]' \
  51 + '(--netmask)--netmask[VirtualBox host-only network mask.]' \
  52 + '(--no-dummy)--no-dummy[Example parameter for the dummy driver.]' \
  53 + '(--retries)--retries[number of port knocking retries during 'start']' \
  54 + '(--serial)--serial[try serial console to get IP address (experimental)]' \
  55 + '(--serialfile)--serialfile[path to the serial socket/pipe.]' \
  56 + '(--ssh)--ssh[path to SSH client utility.]' \
  57 + '(--ssh-keygen)--ssh-keygen[path to ssh-keygen utility.]' \
  58 + '(--sshkey)--sshkey[path to SSH key to use.]' \
  59 + '(--sshport)--sshport[host SSH port (forward to port 22 in VM).]' \
  60 + '(--upperip)--upperip[VirtualBox host-only network DHCP upper bound.]' \
  61 + '(--vbm)--vbm[path to VirtualBox management utility.]' \
  62 + '(--vbox-share)--vbox-share[(defaults to "/Users=Users" if no shares are specified; use "disable" to explicitly prevent any shares from being created) List of directories to share during "up|start|boot" via VirtualBox Guest Additions, with optional labels]' \
  63 + '(--verbose)'{-v,--verbose}'[display verbose command invocations.]' \
  64 + '(--vm)--vm[virtual machine name.]' \
  65 + '(--waittime)--waittime[Time in milliseconds to wait between port knocking retries during 'start']' \
  66 + '*:: :->subcmds' && return 0
  67 +
  68 +#_arguments '*:: :->command'
  69 +
  70 +if (( CURRENT == 1 )); then
  71 + _describe -t commands "boot2docker command" _1st_arguments
  72 + return
  73 +fi
... ... @@ -35,6 +35,7 @@ _1st_arguments=(
35 35 'info:information about a formula'
36 36 'install:install a formula'
37 37 'reinstall:install a formula anew; re-using its current options'
  38 + 'leaves:show installed formulae that are not dependencies of another installed formula'
38 39 'link:link a formula'
39 40 'list:list files in a formula or not-installed formulae'
40 41 'log:git commit log for a formula'
plugins/brew/brew.plugin.zsh
1 1 alias brews='brew list -1'
2   -alias bubu="brew update && brew upgrade && brew cleanup"
  2 +alias bubo='brew update && brew outdated'
  3 +alias bubc='brew upgrade && brew cleanup'
  4 +alias bubu='bubo && bubc'
plugins/bundler/README.md
... ... @@ -39,7 +39,7 @@ This will exclude the `foreman` and `spin` gems (i.e. their executable) from bei
39 39  
40 40 ## Excluded gems
41 41  
42   -These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification.
  42 +These gems should not be called with `bundle exec`. Please see [issue #2923](https://github.com/robbyrussell/oh-my-zsh/pull/2923) on GitHub for clarification.
43 43  
44 44 `berks`
45 45 `foreman`
plugins/bundler/bundler.plugin.zsh
... ... @@ -4,6 +4,7 @@ alias bp=&quot;bundle package&quot;
4 4 alias bo="bundle open"
5 5 alias bu="bundle update"
6 6 alias bi="bundle_install"
  7 +alias bcn="bundle clean"
7 8  
8 9 bundled_commands=(
9 10 annotate
plugins/cakephp3/cakephp3.plugin.zsh
... ... @@ -0,0 +1,19 @@
  1 +# CakePHP 3 basic command completion
  2 +_cakephp3_get_command_list () {
  3 + cakephp3commands=($(bin/cake completion commands));printf "%s\n" "${cakephp3commands[@]}"
  4 +}
  5 +
  6 +_cakephp3 () {
  7 + if [ -f bin/cake ]; then
  8 + compadd `_cakephp3_get_command_list`
  9 + fi
  10 +}
  11 +
  12 +compdef _cakephp3 bin/cake
  13 +compdef _cakephp3 cake
  14 +
  15 +#Alias
  16 +alias c3='bin/cake'
  17 +
  18 +alias c3cache='bin/cake orm_cache clear'
  19 +alias c3migrate='bin/cake migrations migrate'
plugins/coffee/README.md
... ... @@ -0,0 +1,31 @@
  1 +## Coffeescript Plugin
  2 +
  3 +This plugin provides aliases for quickly compiling and previewing your
  4 +cofeescript code.
  5 +
  6 +When writing Coffeescript it's very common to want to preview the output of a
  7 +certain snippet of code, either because you want to test the output or because
  8 +you'd like to execute it in a browser console which doesn't accept Coffeescript.
  9 +
  10 +Preview the compiled result of your coffeescript with `cf "code"` as per the
  11 +following:
  12 +
  13 +```zsh
  14 +$ cf 'if a then be else c'
  15 +if (a) {
  16 + b;
  17 +} else {
  18 + c;
  19 +}
  20 +```
  21 +
  22 +Also provides the following aliases:
  23 +
  24 +* **cfc:** Copies the compiled JS to your clipboard. Very useful when you want
  25 + to run the code in a JS console.
  26 +
  27 +* **cfp:** Compiles from your currently copied clipboard. Useful when you want
  28 + to compile large/multi-line snippets
  29 +
  30 +* **cfpc:** Paste coffeescript from clipboard, compile to JS, then copy the
  31 + the result back to clipboard.
plugins/coffee/coffee.plugin.zsh
... ... @@ -0,0 +1,16 @@
  1 +#!/bin/zsh
  2 +
  3 +# compile a string of coffeescript and print to output
  4 +cf () {
  5 + coffee -peb $1
  6 +}
  7 +# compile & copy to clipboard
  8 +cfc () {
  9 + cf $1 | pbcopy
  10 +}
  11 +
  12 +# compile from pasteboard & print
  13 +alias cfp='coffeeMe "$(pbpaste)"'
  14 +
  15 +# compile from pasteboard and copy to clipboard
  16 +alias cfpc='cfp | pbcopy'
plugins/common-aliases/common-aliases.plugin.zsh
... ... @@ -13,7 +13,7 @@ alias lS=&#39;ls -1FSsh&#39;
13 13 alias lart='ls -1Fcart'
14 14 alias lrt='ls -1Fcrt'
15 15  
16   -alias zshrc='vim ~/.zshrc' # Quick access to the ~/.zshrc file
  16 +alias zshrc='$EDITOR ~/.zshrc' # Quick access to the ~/.zshrc file
17 17  
18 18 alias grep='grep --color'
19 19 alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
plugins/debian/debian.plugin.zsh
... ... @@ -9,8 +9,10 @@
9 9 # You can just set apt_pref='apt-get' to override it.
10 10 if [[ -e $( which -p aptitude 2>&1 ) ]]; then
11 11 apt_pref='aptitude'
  12 + apt_upgr='safe-upgrade'
12 13 else
13 14 apt_pref='apt-get'
  15 + apt_upgr='upgrade'
14 16 fi
15 17  
16 18 # Use sudo by default if it's installed
... ... @@ -45,10 +47,10 @@ if [[ $use_sudo -eq 1 ]]; then
45 47 alias abd='sudo $apt_pref build-dep'
46 48 alias ac='sudo $apt_pref clean'
47 49 alias ad='sudo $apt_pref update'
48   - alias adg='sudo $apt_pref update && sudo $apt_pref upgrade'
  50 + alias adg='sudo $apt_pref update && sudo $apt_pref $apt_upgr'
49 51 alias adu='sudo $apt_pref update && sudo $apt_pref dist-upgrade'
50 52 alias afu='sudo apt-file update'
51   - alias ag='sudo $apt_pref upgrade'
  53 + alias ag='sudo $apt_pref $apt_upgr'
52 54 alias ai='sudo $apt_pref install'
53 55 # Install all packages given on the command line while using only the first word of each line:
54 56 # acs ... | ail
... ... @@ -80,10 +82,10 @@ else
80 82 }
81 83 alias ac='su -ls \'$apt_pref clean\' root'
82 84 alias ad='su -lc \'$apt_pref update\' root'
83   - alias adg='su -lc \'$apt_pref update && aptitude safe-upgrade root'
  85 + alias adg='su -lc \'$apt_pref update && aptitude $apt_upgr root'
84 86 alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root'
85 87 alias afu='su -lc "apt-file update"'
86   - alias ag='su -lc \'$apt_pref safe-upgrade root'
  88 + alias ag='su -lc \'$apt_pref $apt_upgr root'
87 89 ai() {
88 90 cmd="su -lc 'aptitude -P install $@' root"
89 91 print "$cmd"
... ... @@ -136,7 +138,7 @@ apt_pref_compdef abd &quot;build-dep&quot;
136 138 apt_pref_compdef ac "clean"
137 139 apt_pref_compdef ad "update"
138 140 apt_pref_compdef afu "update"
139   -apt_pref_compdef ag "upgrade"
  141 +apt_pref_compdef ag "$apt_upgr"
140 142 apt_pref_compdef ai "install"
141 143 apt_pref_compdef ail "install"
142 144 apt_pref_compdef ap "purge"
plugins/docker-compose/README.md
... ... @@ -0,0 +1 @@
  1 +# Docker-compose plugin for oh my zsh
plugins/docker-compose/docker-compose.plugin.zsh
... ... @@ -0,0 +1,14 @@
  1 +# Authors:
  2 +# https://github.com/tristola
  3 +#
  4 +# Docker-compose related zsh aliases
  5 +
  6 +# Aliases ###################################################################
  7 +
  8 +alias dcup='docker-compose up'
  9 +alias dcb='docker-compose build'
  10 +alias dcrm='docker-compose rm'
  11 +alias dcps='docker-compose ps'
  12 +alias dcstop='docker-compose stop'
  13 +alias dcrestart='docker-compose restart'
  14 +
plugins/docker/_docker
... ... @@ -36,7 +36,7 @@ __docker_images() {
36 36 # ---------------------------
37 37 __attach() {
38 38 _arguments \
39   - '--no-stdin[Do not attach stdin]' \
  39 + '--no-stdin[Do not attach STDIN]' \
40 40 '--sig-proxy[Proxify all received signal to the process (even in non-tty mode)]'
41 41 __docker_containers
42 42 }
... ... @@ -52,16 +52,59 @@ __build() {
52 52  
53 53 __commit() {
54 54 _arguments \
55   - '(-a,--author=)'{-a,--author=}'[Author (eg. "John Hannibal Smith <hannibal@a-team.com>"]' \
  55 + '(-a,--author=)'{-a,--author=}'[Author (e.g. "John Hannibal Smith <hannibal@a-team.com>")]' \
  56 + '(-c,--change=)'{-c,--change=}'[Apply Dockerfile instruction to the created image]' \
56 57 '(-m,--message=)'{-m,--message=}'[Commit message]' \
57   - '--run=[Config automatically applied when the image is run.]'
58   - __docker_containers
  58 + '(-p,--pause=)'{-p,--pause=}'[Pause container during commit]' \
59 59 }
60 60  
61 61 __cp() {
62 62 __docker_containers
63 63 }
64 64  
  65 +__create() {
  66 + _arguments \
  67 + '(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
  68 + '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
  69 + '--add-host=[Add a custom host-to-IP mapping]' \
  70 + '--cap-add=[Add Linux capabilities]' \
  71 + '--cap-drop=[Drop Linux capabilities]' \
  72 + '--cpuset-cpus=[CPUs in which to allow execution (0-3, 0,1)]' \
  73 + '(-c,--cpu-shares=)'{-c,--cpu-shares=}'[CPU shares (relative weight)]' \
  74 + '--cidfile=[Write the container ID to the file]' \
  75 + '--device=[Add a host device to the container]' \
  76 + '--dns=[Set custom dns servers]' \
  77 + '--dns-search=[Set custom DNS search domains]' \
  78 + '(-e,--env=)'{-e,--env=}'[Set environment variables]' \
  79 + '--env-file=[Read in a file of environment variables]' \
  80 + '--entrypoint=[Overwrite the default entrypoint of the image]' \
  81 + '--expose=[Expose a port from the container without publishing it to your host]' \
  82 + '(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \
  83 + '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \
  84 + '--ipc=[IPC namespace to use]' \
  85 + '(-l,--label=)'{-l,--label=}'[Set meta data on a container]' \
  86 + '--link=[Add link to another container (name:alias)]' \
  87 + '--log-driver=[Logging driver for the container]' \
  88 + '--lxc-conf=[Add custom LXC options]' \
  89 + '--mac-address=[Container MAC address (e.g. 92:d0:c6:0a:29:33)]' \
  90 + '(-m,--memory=)'{-m,--memory=}'[Memory limit (format: <number><optional unit>, where unit = b, k, m or g)]' \
  91 + '--net=[Set the Network mode for the container]' \
  92 + '--name=[Assign a name to the container]' \
  93 + '--pid=[PID namespace to use]' \
  94 + '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort/protocol)]' \
  95 + '--privileged=[Give extended privileges to this container]' \
  96 + '--restart=[Restart policy to apply when a container exits]' \
  97 + '--security-opt=[Security Options]' \
  98 + '--sig-proxy=[Proxify all received signal to the process (even in non-tty mode)]' \
  99 + '(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-tty]' \
  100 + '(-u,--user=)'{-u,--user=}'[Username or UID]' \
  101 + '--ulimit=[Ulimit options]' \
  102 + '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. -v /host:/container or -v /container)]' \
  103 + '--volumes-from=[Mount volumes from the specified container(s)]' \
  104 + '(-w,--workdir=)'{-w,--workdir=}'[Working directory inside the container]'
  105 + __docker_images
  106 +}
  107 +
65 108 __diff() {
66 109 __docker_containers
67 110 }
... ... @@ -100,11 +143,6 @@ __info() {
100 143 # no arguments
101 144 }
102 145  
103   -__insert() {
104   - __docker_images
105   - _arguments '*:files:_files'
106   -}
107   -
108 146 __inspect() {
109 147 __docker_images
110 148 __docker_all_containers
... ... @@ -185,28 +223,43 @@ __rmi() {
185 223 __run() {
186 224 _arguments \
187 225 '(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
188   - '(-a,--attach=)'{-a,--attach=}'[Attach to stdin, stdout or stderr.]' \
189   - '(-c,--cpu-shares=)'{-c,--cpu-shares=}': CPU shares (relative weight)]' \
  226 + '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
  227 + '--add-host=[Add a custom host-to-IP mapping]' \
  228 + '--cap-add=[Add Linux capabilities]' \
  229 + '--cap-drop=[Drop Linux capabilities]' \
  230 + '--cpuset-cpus=[CPUs in which to allow execution (0-3, 0,1)]' \
  231 + '(-c,--cpu-shares=)'{-c,--cpu-shares=}'[CPU shares (relative weight)]' \
190 232 '--cidfile=[Write the container ID to the file]' \
191   - '(-d,--detach=)'{-d,--detach=}'[Detached mode: Run container in the background, print new container id]' \
  233 + '(-d,--detach=)'{-d,--detach=}'[Run container in the background, print new container id]' \
  234 + '--device=[Add a host device to the container]' \
192 235 '--dns=[Set custom dns servers]' \
  236 + '--dns-search=[Set custom DNS search domains]' \
193 237 '(-e,--env=)'{-e,--env=}'[Set environment variables]' \
  238 + '--env-file=[Read in a file of environment variables]' \
194 239 '--entrypoint=[Overwrite the default entrypoint of the image]' \
195 240 '--expose=[Expose a port from the container without publishing it to your host]' \
196 241 '(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \
197   - '(-i,--interactive=)'{-i,--interactive=}'[Keep stdin open even if not attached]' \
  242 + '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \
  243 + '--ipc=[IPC namespace to use]' \
  244 + '(-l,--label=)'{-l,--label=}'[Set meta data on a container]' \
198 245 '--link=[Add link to another container (name:alias)]' \
199   - '--lxc-conf=[Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"]' \
  246 + '--log-driver=[Logging driver for the container]' \
  247 + '--lxc-conf=[Add custom LXC options]' \
  248 + '--mac-address=[Container MAC address (e.g. 92:d0:c6:0a:29:33)]' \
200 249 '(-m,--memory=)'{-m,--memory=}'[Memory limit (format: <number><optional unit>, where unit = b, k, m or g)]' \
201   - '(-n,--networking=)'{-n,--networking=}'[Enable networking for this container]' \
  250 + '--net=[Set the Network mode for the container]' \
202 251 '--name=[Assign a name to the container]' \
203   - '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort) (use "docker port" to see the actual mapping)]' \
  252 + '--pid=[PID namespace to use]' \
  253 + '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort/protocol)]' \
204 254 '--privileged=[Give extended privileges to this container]' \
  255 + '--restart=[Restart policy to apply when a container exits]' \
205 256 '--rm=[Automatically remove the container when it exits (incompatible with -d)]' \
  257 + '--security-opt=[Security Options]' \
206 258 '--sig-proxy=[Proxify all received signal to the process (even in non-tty mode)]' \
207 259 '(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-tty]' \
208 260 '(-u,--user=)'{-u,--user=}'[Username or UID]' \
209   - '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)]' \
  261 + '--ulimit=[Ulimit options]' \
  262 + '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. -v /host:/container or -v /container)]' \
210 263 '--volumes-from=[Mount volumes from the specified container(s)]' \
211 264 '(-w,--workdir=)'{-w,--workdir=}'[Working directory inside the container]'
212 265 __docker_images
... ... @@ -225,8 +278,8 @@ __save() {
225 278  
226 279 __start() {
227 280 _arguments \
228   - '(-a,--attach=)'{-a,--attach=}'[Attach container''s stdout/stderr and forward all signals to the process]' \
229   - '(-i,--interactive=)'{-i,--interactive=}'[Attach container''s stdin]'
  281 + '(-a,--attach=)'{-a,--attach=}'[Attach container''s STDOUT/STDERR and forward all signals to the process]' \
  282 + '(-i,--interactive=)'{-i,--interactive=}'[Attach container''s STDIN]'
230 283 __docker_all_containers
231 284 }
232 285  
... ... @@ -271,6 +324,7 @@ _1st_arguments=(
271 324 "build":"Build a container from a Dockerfile"
272 325 "commit":"Create a new image from a container's changes"
273 326 "cp":"Copy files/folders from the containers filesystem to the host path"
  327 + "create":"Create new container without running it"
274 328 "diff":"Inspect changes on a container's filesystem"
275 329 "events":"Get real time events from the server"
276 330 "export":"Stream the contents of a container as a tar archive"
... ... @@ -278,7 +332,6 @@ _1st_arguments=(
278 332 "images":"List images"
279 333 "import":"Create a new filesystem image from the contents of a tarball"
280 334 "info":"Display system-wide information"
281   - "insert":"Insert a file in an image"
282 335 "inspect":"Return low-level information on a container"
283 336 "kill":"Kill a running container"
284 337 "load":"Load an image from a tar archive"
... ... @@ -321,6 +374,8 @@ case &quot;$words[1]&quot; in
321 374 __commit ;;
322 375 cp)
323 376 __cp ;;
  377 + create)
  378 + __create ;;
324 379 diff)
325 380 __diff ;;
326 381 events)
... ... @@ -335,8 +390,6 @@ case &quot;$words[1]&quot; in
335 390 __import ;;
336 391 info)
337 392 __info ;;
338   - insert)
339   - __insert ;;
340 393 inspect)
341 394 __inspect ;;
342 395 kill)
plugins/extract/_extract
... ... @@ -3,6 +3,6 @@
3 3  
4 4 _arguments \
5 5 '(-r --remove)'{-r,--remove}'[Remove archive.]' \
6   - "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0
  6 + "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|ipsw|rar|7z|deb)(-.)'" && return 0
7 7  
8 8  
plugins/extract/extract.plugin.zsh
... ... @@ -23,7 +23,7 @@ function extract() {
23 23  
24 24 remove_archive=1
25 25 if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
26   - remove_archive=0
  26 + remove_archive=0
27 27 shift
28 28 fi
29 29  
... ... @@ -52,7 +52,7 @@ function extract() {
52 52 (*.xz) unxz "$1" ;;
53 53 (*.lzma) unlzma "$1" ;;
54 54 (*.Z) uncompress "$1" ;;
55   - (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;;
  55 + (*.zip|*.war|*.jar|*.sublime-package|*.ipsw) unzip "$1" -d $extract_dir ;;
56 56 (*.rar) unrar x -ad "$1" ;;
57 57 (*.7z) 7za x "$1" ;;
58 58 (*.deb)
... ... @@ -64,10 +64,10 @@ function extract() {
64 64 cd ..; rm *.tar.gz debian-binary
65 65 cd ..
66 66 ;;
67   - (*)
  67 + (*)
68 68 echo "extract: '$1' cannot be extracted" 1>&2
69   - success=1
70   - ;;
  69 + success=1
  70 + ;;
71 71 esac
72 72  
73 73 (( success = $success > 0 ? $success : $? ))
plugins/fasd/fasd.plugin.zsh
1 1 if [ $commands[fasd] ]; then # check if fasd is installed
2   - fasd_cache="$HOME/.fasd-init-cache"
  2 + fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
3 3 if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
4 4 fasd --init auto >| "$fasd_cache"
5 5 fi
plugins/forklift/README.md
... ... @@ -0,0 +1,13 @@
  1 +## forklift
  2 +
  3 +Plugin for ForkLift, an FTP application for OS X.
  4 +
  5 +### Requirements
  6 +
  7 +* [ForkLift](http://forkliftapp.com/forklift/)
  8 +
  9 +### Usage
  10 +
  11 +* If `fl` is called without arguments then the current folder is opened in ForkLift. Is equivalent to `fl .`
  12 +
  13 +* If `fl` is called with a directory as the argument, then that directory is opened in ForkLift
0 14 \ No newline at end of file
plugins/git/README.md
1 1 ## git
2   -**Maintainer:** [Stibbons](https://github.com/Stibbons)
3 2  
4   -This plugin adds several git aliases and increase the completion function provided by zsh
  3 +**Maintainer:** [@ncanceill](https://github.com/ncanceill)
  4 +
  5 +This plugin adds many useful aliases and functions.
  6 +
  7 +### Usage
  8 +
  9 +See the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git) for a list of aliases and functions provided by the plugin.
  10 +
plugins/git/_git-branch
... ... @@ -1,83 +0,0 @@
1   -#compdef git-branch
2   -
3   -_git-branch ()
4   -{
5   - declare l c m d
6   -
7   - l='--color --no-color -r -a --all -v --verbose --abbrev --no-abbrev'
8   - c='-l -f --force -t --track --no-track --set-upstream --contains --merged --no-merged'
9   - m='-m -M'
10   - d='-d -D'
11   -
12   - declare -a dependent_creation_args
13   - if (( words[(I)-r] == 0 )); then
14   - dependent_creation_args=(
15   - "($l $m $d): :__git_branch_names"
16   - "::start-point:__git_revisions")
17   - fi
18   -
19   - declare -a dependent_deletion_args
20   - if (( words[(I)-d] || words[(I)-D] )); then
21   - dependent_creation_args=
22   - dependent_deletion_args=(
23   - '-r[delete only remote-tracking branches]')
24   - if (( words[(I)-r] )); then
25   - dependent_deletion_args+='*: :__git_ignore_line_inside_arguments __git_remote_branch_names'
26   - else
27   - dependent_deletion_args+='*: :__git_ignore_line_inside_arguments __git_branch_names'
28   - fi
29   - fi
30   -
31   - declare -a dependent_modification_args
32   - if (( words[(I)-m] || words[(I)-M] )); then
33   - dependent_creation_args=
34   - dependent_modification_args=(
35   - ':old or new branch name:__git_branch_names'
36   - '::new branch name:__git_branch_names')
37   - fi
38   -
39   - _arguments -w -S -s \
40   - "($c $m $d --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \
41   - "($c $m $d : --color)--no-color[turn off branch coloring]" \
42   - "($c $m -a --all)-r[list or delete only remote-tracking branches]" \
43   - "($c $m $d : -r)"{-a,--all}"[list both remote-tracking branches and local branches]" \
44   - "($c $m $d : -v --verbose)"{-v,--verbose}'[show SHA1 and commit subject line for each head]' \
45   - "($c $m $d :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \
46   - "($c $m $d :)--no-abbrev[do not abbreviate sha1s]" \
47   - "($l $m $d)-l[create the branch's reflog]" \
48   - "($l $m $d -f --force)"{-f,--force}"[force the creation of a new branch]" \
49   - "($l $m $d -t --track)"{-t,--track}"[set up configuration so that pull merges from the start point]" \
50   - "($l $m $d)--no-track[override the branch.autosetupmerge configuration variable]" \
51   - "($l $m $d)--set-upstream[set up configuration so that pull merges]" \
52   - "($l $m $d)--contains=[only list branches which contain the specified commit]: :__git_committishs" \
53   - "($l $m $d)--merged=[only list branches which are fully contained by HEAD]: :__git_committishs" \
54   - "($l $m $d)--no-merged=[do not list branches which are fully contained by HEAD]: :__git_committishs" \
55   - $dependent_creation_args \
56   - "($l $c $d -M)-m[rename a branch and the corresponding reflog]" \
57   - "($l $c $d -m)-M[rename a branch even if the new branch-name already exists]" \
58   - $dependent_modification_args \
59   - "($l $c $m -D)-d[delete a fully merged branch]" \
60   - "($l $c $m -d)-D[delete a branch]" \
61   - $dependent_deletion_args
62   -}
63   -
64   -(( $+functions[__git_ignore_line] )) ||
65   -__git_ignore_line () {
66   - declare -a ignored
67   - ignored=()
68   - ((CURRENT > 1)) &&
69   - ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
70   - ((CURRENT < $#line)) &&
71   - ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
72   - $* -F ignored
73   -}
74   -
75   -(( $+functions[__git_ignore_line_inside_arguments] )) ||
76   -__git_ignore_line_inside_arguments () {
77   - declare -a compadd_opts
78   -
79   - zparseopts -D -E -a compadd_opts V: J: 1 2 n f X: M: P: S: r: R: q F:
80   -
81   - __git_ignore_line $* $compadd_opts
82   -}
83   -
plugins/git/_git-remote
... ... @@ -1,74 +0,0 @@
1   -#compdef git-remote
2   -
3   -# NOTE: --track is undocumented.
4   -# TODO: --track, -t, --master, and -m should take remote branches, I guess.
5   -# NOTE: --master is undocumented.
6   -# NOTE: --fetch is undocumented.
7   -_git-remote () {
8   - local curcontext=$curcontext state line
9   - declare -A opt_args
10   -
11   - _arguments -C \
12   - ':command:->command' \
13   - '*::options:->options' && ret=0
14   -
15   - case $state in
16   - (command)
17   - declare -a commands
18   -
19   - commands=(
20   - 'add:add a new remote'
21   - 'show:show information about a given remote'
22   - 'prune:delete all stale tracking branches for a given remote'
23   - 'update:fetch updates for a set of remotes'
24   - 'rm:remove a remote from .git/config and all associated tracking branches'
25   - 'rename:rename a remote from .git/config and update all associated tracking branches'
26   - 'set-head:sets or deletes the default branch'
27   - 'set-branches:changes the list of branches tracked by the named remote.'
28   - 'set-url:changes URL remote points to.'
29   - )
30   -
31   - _describe -t commands 'sub-command' commands && ret=0
32   - ;;
33   - (options)
34   - case $line[1] in
35   - (add)
36   - _arguments \
37   - '*'{--track,-t}'[track given branch instead of default glob refspec]:branch:__git_branch_names' \
38   - '(--master -m)'{--master,-m}'[set the remote'\''s HEAD to point to given master branch]:branch:__git_branch_names' \
39   - '(--fetch -f)'{--fetch,-f}'[run git-fetch on the new remote after it has been created]' \
40   - ':branch name:__git_remotes' \
41   - ':url:_urls' && ret=0
42   - ;;
43   - (show)
44   - _arguments \
45   - '-n[do not contact the remote for a list of branches]' \
46   - ':remote:__git_remotes' && ret=0
47   - ;;
48   - (prune)
49   - _arguments \
50   - '(--dry-run -n)'{-n,--dry-run}'[do not actually prune, only list what would be done]' \
51   - ':remote:__git_remotes' && ret=0
52   - ;;
53   - (update)
54   - __git_remote-groups && ret=0
55   - ;;
56   - (rm)
57   - __git_remotes && ret=0
58   - ;;
59   - (rename)
60   - __git_remotes && ret=0
61   - ;;
62   - (set-url)
63   - _arguments \
64   - '*--push[manipulate push URLs]' \
65   - '(--add)--add[add URL]' \
66   - '(--delete)--delete[delete URLs]' \
67   - ':branch name:__git_remotes' \
68   - ':url:_urls' && ret=0
69   - ;;
70   -
71   - esac
72   - ;;
73   - esac
74   -}
plugins/git/git.plugin.zsh
  1 +# Query/use custom command for `git`.
  2 +zstyle -s ":vcs_info:git:*:-all-" "command" _omz_git_git_cmd
  3 +: ${_omz_git_git_cmd:=git}
  4 +
  5 +#
  6 +# Functions
  7 +#
  8 +
  9 +# The current branch name
  10 +# Usage example: git pull origin $(current_branch)
  11 +# Using '--quiet' with 'symbolic-ref' will not cause a fatal error (128) if
  12 +# it's not a symbolic ref, but in a Git repo.
  13 +function current_branch() {
  14 + local ref
  15 + ref=$($_omz_git_git_cmd symbolic-ref --quiet HEAD 2> /dev/null)
  16 + local ret=$?
  17 + if [[ $ret != 0 ]]; then
  18 + [[ $ret == 128 ]] && return # no git repo.
  19 + ref=$($_omz_git_git_cmd rev-parse --short HEAD 2> /dev/null) || return
  20 + fi
  21 + echo ${ref#refs/heads/}
  22 +}
  23 +# The list of remotes
  24 +function current_repository() {
  25 + if ! $_omz_git_git_cmd rev-parse --is-inside-work-tree &> /dev/null; then
  26 + return
  27 + fi
  28 + echo $($_omz_git_git_cmd remote -v | cut -d':' -f 2)
  29 +}
  30 +# Pretty log messages
  31 +function _git_log_prettily(){
  32 + if ! [ -z $1 ]; then
  33 + git log --pretty=$1
  34 + fi
  35 +}
  36 +# Warn if the current branch is a WIP
  37 +function work_in_progress() {
  38 + if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
  39 + echo "WIP!!"
  40 + fi
  41 +}
  42 +
  43 +#
1 44 # Aliases
  45 +# (sorted alphabetically)
  46 +#
  47 +
2 48 alias g='git'
3   -compdef g=git
4   -alias gst='git status'
5   -compdef _git gst=git-status
6   -alias gd='git diff'
7   -compdef _git gd=git-diff
8   -alias gdc='git diff --cached'
9   -compdef _git gdc=git-diff
10   -alias gdt='git diff-tree --no-commit-id --name-only -r'
11   -compdef _git gdc=git diff-tree --no-commit-id --name-only -r
12   -alias gl='git pull'
13   -compdef _git gl=git-pull
14   -alias gup='git pull --rebase'
15   -compdef _git gup=git-fetch
16   -alias gp='git push'
17   -compdef _git gp=git-push
18   -alias gd='git diff'
19   -gdv() { git diff -w "$@" | view - }
20   -compdef _git gdv=git-diff
21   -alias gdt='git difftool'
  49 +
  50 +alias ga='git add'
  51 +alias gaa='git add --all'
  52 +alias gapa='git add --patch'
  53 +
  54 +alias gb='git branch'
  55 +alias gba='git branch -a'
  56 +alias gbda='git branch --merged | command grep -vE "^(\*|\s*master\s*$)" | command xargs -n 1 git branch -d'
  57 +alias gbl='git blame -b -w'
  58 +alias gbnm='git branch --no-merged'
  59 +alias gbr='git branch --remote'
  60 +alias gbs='git bisect'
  61 +alias gbsb='git bisect bad'
  62 +alias gbsg='git bisect good'
  63 +alias gbsr='git bisect reset'
  64 +alias gbss='git bisect start'
  65 +
22 66 alias gc='git commit -v'
23   -compdef _git gc=git-commit
24 67 alias gc!='git commit -v --amend'
25   -compdef _git gc!=git-commit
26 68 alias gca='git commit -v -a'
27   -compdef _git gc=git-commit
28 69 alias gca!='git commit -v -a --amend'
29   -compdef _git gca!=git-commit
  70 +alias gcan!='git commit -v -a -s --no-edit --amend'
  71 +alias gcb='git checkout -b'
  72 +alias gcf='git config --list'
  73 +alias gcl='git clone --recursive'
  74 +alias gclean='git reset --hard && git clean -dfx'
  75 +alias gcm='git checkout master'
30 76 alias gcmsg='git commit -m'
31   -compdef _git gcmsg=git-commit
32 77 alias gco='git checkout'
33   -compdef _git gco=git-checkout
34   -alias gcm='git checkout master'
35   -alias gr='git remote'
36   -compdef _git gr=git-remote
37   -alias grv='git remote -v'
38   -compdef _git grv=git-remote
39   -alias grmv='git remote rename'
40   -compdef _git grmv=git-remote
41   -alias grrm='git remote remove'
42   -compdef _git grrm=git-remote
43   -alias grset='git remote set-url'
44   -compdef _git grset=git-remote
45   -alias grup='git remote update'
46   -compdef _git grset=git-remote
47   -alias grbi='git rebase -i'
48   -compdef _git grbi=git-rebase
49   -alias grbc='git rebase --continue'
50   -compdef _git grbc=git-rebase
51   -alias grba='git rebase --abort'
52   -compdef _git grba=git-rebase
53   -alias gb='git branch'
54   -compdef _git gb=git-branch
55   -alias gba='git branch -a'
56   -compdef _git gba=git-branch
57   -alias gbr='git branch --remote'
58 78 alias gcount='git shortlog -sn'
59 79 compdef gcount=git
60   -alias gcl='git config --list'
61 80 alias gcp='git cherry-pick'
62   -compdef _git gcp=git-cherry-pick
63   -alias glg='git log --stat --max-count=10'
64   -compdef _git glg=git-log
65   -alias glgg='git log --graph --max-count=10'
66   -compdef _git glgg=git-log
67   -alias glgga='git log --graph --decorate --all'
68   -compdef _git glgga=git-log
69   -alias glo='git log --oneline --decorate --color'
70   -compdef _git glo=git-log
71   -alias glog='git log --oneline --decorate --color --graph'
72   -compdef _git glog=git-log
73   -alias gss='git status -s'
74   -compdef _git gss=git-status
75   -alias ga='git add'
76   -compdef _git ga=git-add
77   -alias gap='git add --patch'
78   -alias gaa='git add --all'
79   -alias gm='git merge'
80   -compdef _git gm=git-merge
81   -alias grh='git reset HEAD'
82   -alias grhh='git reset HEAD --hard'
83   -alias gclean='git reset --hard && git clean -dfx'
84   -alias gwc='git whatchanged -p --abbrev-commit --pretty=medium'
85   -
86   -# Sign and verify commits with GPG
87 81 alias gcs='git commit -S'
88   -compdef _git gcs=git-commit
89   -alias gsps='git show --pretty=short --show-signature'
90   -compdef _git gsps=git-show
91   -
92   -# Sign and verify tags with GPG
93   -alias gts='git tag -s'
94   -compdef _git gts=git-tag
95   -alias gvt='git verify-tag'
96   -compdef _git gvt=git verify-tag
97 82  
98   -#remove the gf alias
99   -#alias gf='git ls-files | grep'
  83 +alias gd='git diff'
  84 +alias gdca='git diff --cached'
  85 +alias gdt='git diff-tree --no-commit-id --name-only -r'
  86 +gdv() { git diff -w "$@" | view - }
  87 +compdef _git gdv=git-diff
  88 +alias gdw='git diff --word-diff'
100 89  
101   -alias gpoat='git push origin --all && git push origin --tags'
102   -alias gmt='git mergetool --no-prompt'
103   -compdef _git gmt=git-mergetool
  90 +alias gf='git fetch'
  91 +alias gfa='git fetch --all --prune'
  92 +function gfg() { git ls-files | grep $@ }
  93 +compdef gfg=grep
  94 +alias gfo='git fetch origin'
104 95  
105 96 alias gg='git gui citool'
106 97 alias gga='git gui citool --amend'
107   -alias gk='gitk --all --branches'
108   -
109   -alias gsts='git stash show --text'
110   -alias gsta='git stash'
111   -alias gstp='git stash pop'
112   -alias gstd='git stash drop'
113   -
114   -# Will cd into the top of the current repository
115   -# or submodule.
116   -alias grt='cd $(git rev-parse --show-toplevel || echo ".")'
117   -
118   -# Git and svn mix
119   -alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
120   -compdef git-svn-dcommit-push=git
121   -
122   -alias gsr='git svn rebase'
123   -alias gsd='git svn dcommit'
124   -#
125   -# Will return the current branch name
126   -# Usage example: git pull origin $(current_branch)
127   -#
128   -function current_branch() {
129   - ref=$(git symbolic-ref HEAD 2> /dev/null) || \
130   - ref=$(git rev-parse --short HEAD 2> /dev/null) || return
131   - echo ${ref#refs/heads/}
  98 +ggf() {
  99 +[[ "$#" != 1 ]] && local b="$(current_branch)"
  100 +git push --force origin "${b:=$1}"
132 101 }
133   -
134   -function current_repository() {
135   - ref=$(git symbolic-ref HEAD 2> /dev/null) || \
136   - ref=$(git rev-parse --short HEAD 2> /dev/null) || return
137   - echo $(git remote -v | cut -d':' -f 2)
  102 +compdef _git ggf=git-checkout
  103 +ggl() {
  104 +if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
  105 +git pull origin "${*}"
  106 +else
  107 +[[ "$#" == 0 ]] && local b="$(current_branch)"
  108 +git pull origin "${b:=$1}"
  109 +fi
138 110 }
139   -
140   -# these aliases take advantage of the previous function
  111 +compdef _git ggl=git-checkout
141 112 alias ggpull='git pull origin $(current_branch)'
142   -compdef ggpull=git
143   -alias ggpur='git pull --rebase origin $(current_branch)'
144   -compdef ggpur=git
  113 +compdef _git ggpull=git-checkout
  114 +ggp() {
  115 +if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
  116 +git push origin "${*}"
  117 +else
  118 +[[ "$#" == 0 ]] && local b="$(current_branch)"
  119 +git push origin "${b:=$1}"
  120 +fi
  121 +}
  122 +compdef _git ggp=git-checkout
145 123 alias ggpush='git push origin $(current_branch)'
146   -compdef ggpush=git
147   -alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
148   -compdef ggpnp=git
149   -
150   -# Pretty log messages
151   -function _git_log_prettily(){
152   - if ! [ -z $1 ]; then
153   - git log --pretty=$1
154   - fi
  124 +compdef _git ggpush=git-checkout
  125 +ggpnp() {
  126 +if [[ "$#" == 0 ]]; then
  127 +ggl && ggp
  128 +else
  129 +ggl "${*}" && ggp "${*}"
  130 +fi
155 131 }
  132 +compdef _git ggpnp=git-checkout
  133 +alias ggsup='git branch --set-upstream-to=origin/$(current_branch)'
  134 +ggu() {
  135 +[[ "$#" != 1 ]] && local b="$(current_branch)"
  136 +git pull --rebase origin "${b:=$1}"
  137 +}
  138 +compdef _git ggu=git-checkout
  139 +alias ggpur='ggu'
  140 +compdef _git ggpur=git-checkout
  141 +
  142 +alias gignore='git update-index --assume-unchanged'
  143 +alias gignored='git ls-files -v | grep "^[[:lower:]]"'
  144 +alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
  145 +compdef git-svn-dcommit-push=git
  146 +
  147 +alias gk='\gitk --all --branches'
  148 +compdef _git gk='gitk'
  149 +alias gke='\gitk --all $(git log -g --pretty=format:%h)'
  150 +compdef _git gke='gitk'
  151 +
  152 +alias gl='git pull'
  153 +alias glg='git log --stat --color'
  154 +alias glgp='git log --stat --color -p'
  155 +alias glgg='git log --graph --color'
  156 +alias glgga='git log --graph --decorate --all'
  157 +alias glgm='git log --graph --max-count=10'
  158 +alias glo='git log --oneline --decorate --color'
  159 +alias glol="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
  160 +alias glola="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all"
  161 +alias glog='git log --oneline --decorate --color --graph'
156 162 alias glp="_git_log_prettily"
157 163 compdef _git glp=git-log
158 164  
159   -# Work In Progress (wip)
160   -# These features allow to pause a branch development and switch to another one (wip)
161   -# When you want to go back to work, just unwip it
162   -#
163   -# This function return a warning if the current branch is a wip
164   -function work_in_progress() {
165   - if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
166   - echo "WIP!!"
167   - fi
168   -}
169   -# these alias commit and uncomit wip branches
170   -alias gwip='git add -A; git ls-files --deleted -z | xargs -r0 git rm; git commit -m "--wip--"'
171   -alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
  165 +alias gm='git merge'
  166 +alias gmom='git merge origin/master'
  167 +alias gmt='git mergetool --no-prompt'
  168 +alias gmtvim='git mergetool --no-prompt --tool=vimdiff'
  169 +alias gmum='git merge upstream/master'
  170 +
  171 +alias gp='git push'
  172 +alias gpd='git push --dry-run'
  173 +alias gpoat='git push origin --all && git push origin --tags'
  174 +compdef _git gpoat=git-push
  175 +alias gpu='git push upstream'
  176 +alias gpv='git push -v'
  177 +
  178 +alias gr='git remote'
  179 +alias gra='git remote add'
  180 +alias grb='git rebase'
  181 +alias grba='git rebase --abort'
  182 +alias grbc='git rebase --continue'
  183 +alias grbi='git rebase -i'
  184 +alias grbm='git rebase master'
  185 +alias grbs='git rebase --skip'
  186 +alias grh='git reset HEAD'
  187 +alias grhh='git reset HEAD --hard'
  188 +alias grmv='git remote rename'
  189 +alias grrm='git remote remove'
  190 +alias grset='git remote set-url'
  191 +alias grt='cd $(git rev-parse --show-toplevel || echo ".")'
  192 +alias gru='git reset --'
  193 +alias grup='git remote update'
  194 +alias grv='git remote -v'
  195 +
  196 +alias gsb='git status -sb'
  197 +alias gsd='git svn dcommit'
  198 +alias gsi='git submodule init'
  199 +alias gsps='git show --pretty=short --show-signature'
  200 +alias gsr='git svn rebase'
  201 +alias gss='git status -s'
  202 +alias gst='git status'
  203 +alias gsta='git stash'
  204 +alias gstaa='git stash apply'
  205 +alias gstd='git stash drop'
  206 +alias gstl='git stash list'
  207 +alias gstp='git stash pop'
  208 +alias gsts='git stash show --text'
  209 +alias gsu='git submodule update'
  210 +
  211 +alias gts='git tag -s'
172 212  
173   -# these alias ignore changes to file
174   -alias gignore='git update-index --assume-unchanged'
175 213 alias gunignore='git update-index --no-assume-unchanged'
176   -# list temporarily ignored files
177   -alias gignored='git ls-files -v | grep "^[[:lower:]]"'
  214 +alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
  215 +alias gup='git pull --rebase'
  216 +alias gupv='git pull --rebase -v'
  217 +
  218 +alias gvt='git verify-tag'
  219 +
  220 +alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
  221 +alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"'
plugins/gitfast/_git
... ... @@ -30,10 +30,10 @@ if [ -z &quot;$script&quot; ]; then
30 30 local -a locations
31 31 local e
32 32 locations=(
  33 + "$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash"
33 34 '/etc/bash_completion.d/git' # fedora, old debian
34 35 '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
35 36 '/usr/share/bash-completion/git' # gentoo
36   - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
37 37 )
38 38 for e in $locations; do
39 39 test -f $e && script="$e" && break
... ... @@ -76,6 +76,14 @@ __gitcomp_nl ()
76 76 compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
77 77 }
78 78  
  79 +__gitcomp_nl_append ()
  80 +{
  81 + emulate -L zsh
  82 +
  83 + local IFS=$'\n'
  84 + compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
  85 +}
  86 +
79 87 __gitcomp_file ()
80 88 {
81 89 emulate -L zsh
plugins/gitfast/git-completion.bash
1   -#!bash
2   -#
3 1 # bash/zsh completion support for core Git.
4 2 #
5 3 # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
... ... @@ -180,9 +178,9 @@ _get_comp_words_by_ref ()
180 178 }
181 179 fi
182 180  
183   -__gitcompadd ()
  181 +__gitcompappend ()
184 182 {
185   - local i=0
  183 + local i=${#COMPREPLY[@]}
186 184 for x in $1; do
187 185 if [[ "$x" == "$3"* ]]; then
188 186 COMPREPLY[i++]="$2$x$4"
... ... @@ -190,6 +188,12 @@ __gitcompadd ()
190 188 done
191 189 }
192 190  
  191 +__gitcompadd ()
  192 +{
  193 + COMPREPLY=()
  194 + __gitcompappend "$@"
  195 +}
  196 +
193 197 # Generates completion reply, appending a space to possible completion words,
194 198 # if necessary.
195 199 # It accepts 1 to 4 arguments:
... ... @@ -220,6 +224,14 @@ __gitcomp ()
220 224 esac
221 225 }
222 226  
  227 +# Variation of __gitcomp_nl () that appends to the existing list of
  228 +# completion candidates, COMPREPLY.
  229 +__gitcomp_nl_append ()
  230 +{
  231 + local IFS=$'\n'
  232 + __gitcompappend "$1" "${2-}" "${3-$cur}" "${4- }"
  233 +}
  234 +
223 235 # Generates completion reply from newline-separated possible completion words
224 236 # by appending a space to all of them.
225 237 # It accepts 1 to 4 arguments:
... ... @@ -231,8 +243,8 @@ __gitcomp ()
231 243 # appended.
232 244 __gitcomp_nl ()
233 245 {
234   - local IFS=$'\n'
235   - __gitcompadd "$1" "${2-}" "${3-$cur}" "${4- }"
  246 + COMPREPLY=()
  247 + __gitcomp_nl_append "$@"
236 248 }
237 249  
238 250 # Generates completion reply with compgen from newline-separated possible
... ... @@ -673,7 +685,6 @@ __git_list_porcelain_commands ()
673 685 index-pack) : plumbing;;
674 686 init-db) : deprecated;;
675 687 local-fetch) : plumbing;;
676   - lost-found) : infrequent;;
677 688 ls-files) : plumbing;;
678 689 ls-remote) : plumbing;;
679 690 ls-tree) : plumbing;;
... ... @@ -687,14 +698,12 @@ __git_list_porcelain_commands ()
687 698 pack-refs) : plumbing;;
688 699 parse-remote) : plumbing;;
689 700 patch-id) : plumbing;;
690   - peek-remote) : plumbing;;
691 701 prune) : plumbing;;
692 702 prune-packed) : plumbing;;
693 703 quiltimport) : import;;
694 704 read-tree) : plumbing;;
695 705 receive-pack) : plumbing;;
696 706 remote-*) : transport;;
697   - repo-config) : deprecated;;
698 707 rerere) : plumbing;;
699 708 rev-list) : plumbing;;
700 709 rev-parse) : plumbing;;
... ... @@ -707,7 +716,6 @@ __git_list_porcelain_commands ()
707 716 ssh-*) : transport;;
708 717 stripspace) : plumbing;;
709 718 symbolic-ref) : plumbing;;
710   - tar-tree) : deprecated;;
711 719 unpack-file) : plumbing;;
712 720 unpack-objects) : plumbing;;
713 721 update-index) : plumbing;;
... ... @@ -901,7 +909,7 @@ _git_add ()
901 909 esac
902 910  
903 911 # XXX should we check for --update and --all options ?
904   - __git_complete_index_file "--others --modified"
  912 + __git_complete_index_file "--others --modified --directory --no-empty-directory"
905 913 }
906 914  
907 915 _git_archive ()
... ... @@ -1063,7 +1071,7 @@ _git_clean ()
1063 1071 esac
1064 1072  
1065 1073 # XXX should we check for -x option ?
1066   - __git_complete_index_file "--others"
  1074 + __git_complete_index_file "--others --directory"
1067 1075 }
1068 1076  
1069 1077 _git_clone ()
... ... @@ -1188,7 +1196,7 @@ _git_diff ()
1188 1196 __git_complete_revlist_file
1189 1197 }
1190 1198  
1191   -__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
  1199 +__git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff
1192 1200 tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
1193 1201 "
1194 1202  
... ... @@ -1491,6 +1499,12 @@ _git_mergetool ()
1491 1499  
1492 1500 _git_merge_base ()
1493 1501 {
  1502 + case "$cur" in
  1503 + --*)
  1504 + __gitcomp "--octopus --independent --is-ancestor --fork-point"
  1505 + return
  1506 + ;;
  1507 + esac
1494 1508 __gitcomp_nl "$(__git_refs)"
1495 1509 }
1496 1510  
... ... @@ -1623,7 +1637,7 @@ _git_rebase ()
1623 1637 --preserve-merges --stat --no-stat
1624 1638 --committer-date-is-author-date --ignore-date
1625 1639 --ignore-whitespace --whitespace=
1626   - --autosquash
  1640 + --autosquash --fork-point --no-fork-point
1627 1641 "
1628 1642  
1629 1643 return
... ... @@ -1833,6 +1847,7 @@ _git_config ()
1833 1847 branch.*)
1834 1848 local pfx="${cur%.*}." cur_="${cur#*.}"
1835 1849 __gitcomp_nl "$(__git_heads)" "$pfx" "$cur_" "."
  1850 + __gitcomp_nl_append $'autosetupmerge\nautosetuprebase\n' "$pfx" "$cur_"
1836 1851 return
1837 1852 ;;
1838 1853 guitool.*.*)
... ... @@ -1875,6 +1890,7 @@ _git_config ()
1875 1890 remote.*)
1876 1891 local pfx="${cur%.*}." cur_="${cur#*.}"
1877 1892 __gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "."
  1893 + __gitcomp_nl_append "pushdefault" "$pfx" "$cur_"
1878 1894 return
1879 1895 ;;
1880 1896 url.*.*)
... ... @@ -1997,6 +2013,7 @@ _git_config ()
1997 2013 fetch.unpackLimit
1998 2014 format.attach
1999 2015 format.cc
  2016 + format.coverLetter
2000 2017 format.headers
2001 2018 format.numbered
2002 2019 format.pretty
... ... @@ -2580,7 +2597,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
2580 2597 --*=*|*.) ;;
2581 2598 *) c="$c " ;;
2582 2599 esac
2583   - array[$#array+1]="$c"
  2600 + array[${#array[@]}+1]="$c"
2584 2601 done
2585 2602 compset -P '*[=:]'
2586 2603 compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
plugins/gitfast/git-prompt.sh
... ... @@ -60,6 +60,7 @@
60 60 # of values:
61 61 #
62 62 # verbose show number of commits ahead/behind (+/-) upstream
  63 +# name if verbose, then also show the upstream abbrev name
63 64 # legacy don't use the '--count' option available in recent
64 65 # versions of git-rev-list
65 66 # git always compare HEAD to @{upstream}
... ... @@ -84,13 +85,17 @@
84 85 # the colored output of "git status -sb" and are available only when
85 86 # using __git_ps1 for PROMPT_COMMAND or precmd.
86 87  
  88 +# check whether printf supports -v
  89 +__git_printf_supports_v=
  90 +printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
  91 +
87 92 # stores the divergence from upstream in $p
88 93 # used by GIT_PS1_SHOWUPSTREAM
89 94 __git_ps1_show_upstream ()
90 95 {
91 96 local key value
92 97 local svn_remote svn_url_pattern count n
93   - local upstream=git legacy="" verbose=""
  98 + local upstream=git legacy="" verbose="" name=""
94 99  
95 100 svn_remote=()
96 101 # get some config options from git-config
... ... @@ -106,7 +111,7 @@ __git_ps1_show_upstream ()
106 111 ;;
107 112 svn-remote.*.url)
108 113 svn_remote[$((${#svn_remote[@]} + 1))]="$value"
109   - svn_url_pattern+="\|$value"
  114 + svn_url_pattern="$svn_url_pattern\|$value"
110 115 upstream=svn+git # default upstream is SVN if available, else git
111 116 ;;
112 117 esac
... ... @@ -118,6 +123,7 @@ __git_ps1_show_upstream ()
118 123 git|svn) upstream="$option" ;;
119 124 verbose) verbose=1 ;;
120 125 legacy) legacy=1 ;;
  126 + name) name=1 ;;
121 127 esac
122 128 done
123 129  
... ... @@ -200,6 +206,9 @@ __git_ps1_show_upstream ()
200 206 *) # diverged from upstream
201 207 p=" u+${count#* }-${count% *}" ;;
202 208 esac
  209 + if [[ -n "$count" && -n "$name" ]]; then
  210 + p="$p $(git rev-parse --abbrev-ref "$upstream" 2>/dev/null)"
  211 + fi
203 212 fi
204 213  
205 214 }
... ... @@ -250,6 +259,13 @@ __git_ps1_colorize_gitstring ()
250 259 r="$c_clear$r"
251 260 }
252 261  
  262 +eread ()
  263 +{
  264 + f="$1"
  265 + shift
  266 + test -r "$f" && read "$@" <"$f"
  267 +}
  268 +
253 269 # __git_ps1 accepts 0 or 1 arguments (i.e., format string)
254 270 # when called from PS1 using command substitution
255 271 # in this mode it prints text to add to bash PS1 prompt (includes branch name)
... ... @@ -312,9 +328,9 @@ __git_ps1 ()
312 328 local step=""
313 329 local total=""
314 330 if [ -d "$g/rebase-merge" ]; then
315   - read b 2>/dev/null <"$g/rebase-merge/head-name"
316   - read step 2>/dev/null <"$g/rebase-merge/msgnum"
317   - read total 2>/dev/null <"$g/rebase-merge/end"
  331 + eread "$g/rebase-merge/head-name" b
  332 + eread "$g/rebase-merge/msgnum" step
  333 + eread "$g/rebase-merge/end" total
318 334 if [ -f "$g/rebase-merge/interactive" ]; then
319 335 r="|REBASE-i"
320 336 else
... ... @@ -322,10 +338,10 @@ __git_ps1 ()
322 338 fi
323 339 else
324 340 if [ -d "$g/rebase-apply" ]; then
325   - read step 2>/dev/null <"$g/rebase-apply/next"
326   - read total 2>/dev/null <"$g/rebase-apply/last"
  341 + eread "$g/rebase-apply/next" step
  342 + eread "$g/rebase-apply/last" total
327 343 if [ -f "$g/rebase-apply/rebasing" ]; then
328   - read b 2>/dev/null <"$g/rebase-apply/head-name"
  344 + eread "$g/rebase-apply/head-name" b
329 345 r="|REBASE"
330 346 elif [ -f "$g/rebase-apply/applying" ]; then
331 347 r="|AM"
... ... @@ -349,7 +365,7 @@ __git_ps1 ()
349 365 b="$(git symbolic-ref HEAD 2>/dev/null)"
350 366 else
351 367 local head=""
352   - if ! read head 2>/dev/null <"$g/HEAD"; then
  368 + if ! eread "$g/HEAD" head; then
353 369 if [ $pcmode = yes ]; then
354 370 PS1="$ps1pc_start$ps1pc_end"
355 371 fi
... ... @@ -433,7 +449,7 @@ __git_ps1 ()
433 449 local gitstring="$c${b##refs/heads/}${f:+$z$f}$r$p"
434 450  
435 451 if [ $pcmode = yes ]; then
436   - if [[ -n ${ZSH_VERSION-} ]]; then
  452 + if [ "${__git_printf_supports_v-}" != yes ]; then
437 453 gitstring=$(printf -- "$printf_format" "$gitstring")
438 454 else
439 455 printf -v gitstring -- "$printf_format" "$gitstring"
plugins/gradle/gradle.plugin.zsh
... ... @@ -72,7 +72,7 @@ _gradle_tasks () {
72 72 if [ in_gradle ]; then
73 73 _gradle_arguments
74 74 if _gradle_does_task_list_need_generating; then
75   - gradle tasks --all | grep "^[ ]*[a-zA-Z0-9]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
  75 + gradle tasks --all | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
76 76 fi
77 77 compadd -X "==== Gradle Tasks ====" `cat .gradletasknamecache`
78 78 fi
... ... @@ -82,7 +82,7 @@ _gradlew_tasks () {
82 82 if [ in_gradle ]; then
83 83 _gradle_arguments
84 84 if _gradle_does_task_list_need_generating; then
85   - gradlew tasks --all | grep "^[ ]*[a-zA-Z0-9]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
  85 + gradlew tasks --all | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
86 86 fi
87 87 compadd -X "==== Gradlew Tasks ====" `cat .gradletasknamecache`
88 88 fi
plugins/history-substring-search/README.markdown
1 1 To activate this script, please include it the `plugins` variable within `~/.zshrc`
2 2  
3   - `plugins=(git history-substring-search.zsh)`
  3 + `plugins=(git history-substring-search)`
4 4  
5 5 See the "history-substring-search.zsh" file for more information:
6 6  
plugins/history-substring-search/history-substring-search.zsh
... ... @@ -175,7 +175,6 @@ fi
175 175 # implementation details
176 176 #-----------------------------------------------------------------------------
177 177  
178   -setopt extendedglob
179 178 zmodload -F zsh/parameter
180 179  
181 180 #
... ... @@ -284,6 +283,7 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
284 283 fi
285 284  
286 285 function _history-substring-search-begin() {
  286 + setopt localoptions extendedglob
287 287 _history_substring_search_move_cursor_eol=false
288 288 _history_substring_search_query_highlight=
289 289  
... ... @@ -350,6 +350,7 @@ function _history-substring-search-begin() {
350 350 }
351 351  
352 352 function _history-substring-search-end() {
  353 + setopt localoptions extendedglob
353 354 _history_substring_search_result=$BUFFER
354 355  
355 356 # move the cursor to the end of the command line
plugins/history/README.md
... ... @@ -0,0 +1,15 @@
  1 +## history
  2 +
  3 +Provides a couple of convenient aliases for using the `history` command to examine your command line history.
  4 +
  5 +### Requirements
  6 +
  7 +* None.
  8 +
  9 +### Usage
  10 +
  11 +* If `h` is called, your command history is listed. Equivalent to using `history`
  12 +
  13 +* If `hsi` is called with an argument, a **case insensitive** `grep` search is performed on your command history, looking for commands that match the argument provided
  14 +
  15 +* If `hsi` is called without an argument you will help on `grep` arguments
0 16 \ No newline at end of file
plugins/httpie/README.md
... ... @@ -0,0 +1,6 @@
  1 +## HTTPie
  2 +**Maintainer:** [lululau](https://github.com/lululau)
  3 +
  4 +This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement.
  5 +
  6 +[HTTPie Homepage](http://httpie.org)
plugins/jira/jira.plugin.zsh
... ... @@ -49,6 +49,20 @@ open_jira_issue () {
49 49 else
50 50 $open_cmd "$jira_url/browse/$jira_prefix$1"
51 51 fi
  52 + else
  53 + local addcomment=''
  54 + if [[ "$2" == "m" ]]; then
  55 + addcomment="#add-comment"
  56 + echo "Add comment to issue #$1"
  57 + else
  58 + echo "Opening issue #$1"
  59 + fi
  60 +
  61 + if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
  62 + $open_cmd "$jira_url/issues/$1$addcomment"
  63 + else
  64 + $open_cmd "$jira_url/browse/$1$addcomment"
  65 + fi
52 66 fi
53 67 }
54 68  
plugins/jump/jump.plugin.zsh
... ... @@ -13,7 +13,7 @@ jump() {
13 13 }
14 14  
15 15 mark() {
16   - if (( $# == 0 )); then
  16 + if [[ ( $# == 0 ) || ( "$1" == "." ) ]]; then
17 17 MARK=$(basename "$PWD")
18 18 else
19 19 MARK="$1"
plugins/kitchen/_kitchen
... ... @@ -0,0 +1,41 @@
  1 +# author: Peter Eisentraut
  2 +# source: https://gist.github.com/petere/10307599
  3 +# compdef kitchen
  4 +
  5 +_kitchen() {
  6 + local curcontext="$curcontext" state line
  7 + typeset -A opt_args
  8 +
  9 + _arguments '1: :->cmds'\
  10 + '2: :->args'
  11 +
  12 + case $state in
  13 + cmds)
  14 + _arguments "1:Commands:(console converge create destroy diagnose driver help init list login setup test verify version)"
  15 + ;;
  16 + args)
  17 + case $line[1] in
  18 + converge|create|destroy|diagnose|list|setup|test|verify)
  19 + compadd "$@" all
  20 + _kitchen_instances
  21 + ;;
  22 + login)
  23 + _kitchen_instances
  24 + ;;
  25 + esac
  26 + ;;
  27 + esac
  28 +}
  29 +
  30 +_kitchen_instances() {
  31 + if [[ $_kitchen_instances_cache_dir != $PWD ]]; then
  32 + unset _kitchen_instances_cache
  33 + fi
  34 + if [[ ${+_kitchen_instances_cache} -eq 0 ]]; then
  35 + _kitchen_instances_cache=(${(f)"$(bundle exec kitchen list -b 2>/dev/null || kitchen list -b 2>/dev/null)"})
  36 + _kitchen_instances_cache_dir=$PWD
  37 + fi
  38 + compadd -a _kitchen_instances_cache
  39 +}
  40 +
  41 +_kitchen "$@"
plugins/laravel5/laravel5.plugin.zsh
... ... @@ -15,6 +15,6 @@ compdef _laravel5 la5
15 15 #Alias
16 16 alias la5='php artisan'
17 17  
18   -alias la5dump='php artisan dump-autoload'
19 18 alias la5cache='php artisan cache:clear'
20   -alias la5routes='php artisan routes'
  19 +alias la5routes='php artisan route:list'
  20 +alias la5vendor='php artisan vendor:publish'
plugins/last-working-dir/last-working-dir.plugin.zsh
... ... @@ -15,7 +15,7 @@ function chpwd() {
15 15  
16 16 # Changes directory to the last working directory.
17 17 function lwd() {
18   - [[ ! -r "$cache_file" ]] || cd `cat "$cache_file"`
  18 + [[ ! -r "$cache_file" ]] || cd "`cat "$cache_file"`"
19 19 }
20 20  
21 21 # Automatically jump to last working directory unless this isn't the first time
plugins/mercurial/README.md
... ... @@ -0,0 +1,64 @@
  1 +# Mercurial plugin
  2 +### Usage
  3 +Update .zshrc:
  4 +
  5 +1. Add name to the list of plugins, e.g. `plugins = (..., mercurial, ...)`
  6 + (that is pretty obvious).
  7 +2. Change PROMPT variable of current theme to contain current folder mercurial repo info:
  8 +
  9 + robbyrussel theme is used by default, so you need to modify PROMPT var
  10 + from [this file](https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme)
  11 + by adding `$(hg_prompt_info)` after `$(git_prompt_info)`, so currently it
  12 + looks next:
  13 +
  14 + ```diff
  15 + - PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
  16 + + PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(hg_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
  17 + ```
  18 +
  19 + and put modified var at the end of **.zshrc**.
  20 +3. Initialize additional vars used in plugin. So in short put next in **.zshrc**:
  21 +
  22 + ```
  23 + ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[magenta]%}hg:(%{$fg[red]%}"
  24 + ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
  25 + ZSH_THEME_HG_PROMPT_DIRTY="%{$fg[magenta]%}) %{$fg[yellow]%}✗%{$reset_color%}"
  26 + ZSH_THEME_HG_PROMPT_CLEAN="%{$fg[magenta]%})"
  27 + ```
  28 +
  29 +### What's inside?
  30 +#### Adds handy aliases:
  31 +###### general
  32 +* `hgc` - `hg commit`
  33 +* `hgb` - `hg branch`
  34 +* `hgba` - `hg branches`
  35 +* `hgbk` - `hg bookmarks`
  36 +* `hgco` - `hg checkout`
  37 +* `hgd` - `hg diff`
  38 +* `hged` - `hg diffmerge`
  39 +
  40 +###### pull and update
  41 +* `hgi` - `hg incoming`
  42 +* `hgl` - `hg pull -u`
  43 +* `hglr` - `hg pull --rebase`
  44 +* `hgo` - `hg outgoing`
  45 +* `hgp` - `hg push`
  46 +* `hgs` - `hg status`
  47 +* `hgsl` - `hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n"`
  48 +
  49 +###### this is the 'git commit --amend' equivalent
  50 +* `hgca` - `hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip`
  51 +
  52 +###### list unresolved files (since hg does not list unmerged files in the status command)
  53 +* `hgun` - `hg resolve --list`
  54 +
  55 +#### Displays repo branch and directory status in prompt
  56 +This is the same as git plugin does.
  57 +
  58 +**Note**: additional changes to **.zshrc** are required in order for this to
  59 +work.
  60 +
  61 +### Mantainers
  62 +[ptrv](https://github.com/ptrv) - original creator
  63 +
  64 +[oshybystyi](https://github.com/oshybystyi) - created this README and know how most of code works
plugins/mix-fast/README.md
... ... @@ -0,0 +1,28 @@
  1 +# mix-fast
  2 +
  3 +Fast mix autocompletion plugin.
  4 +
  5 +This script caches the output for later usage and significantly speeds it up.
  6 +It generates a .mix_tasks cache file for current project. Currently if you want
  7 +to update cache you should remove .mix_tasks file
  8 +
  9 +Inspired by and based on rake-fast zsh plugin.
  10 +
  11 +This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/).
  12 +
  13 +
  14 +## Installation
  15 +
  16 +Just add the plugin to your `.zshrc`:
  17 +
  18 +```bash
  19 +plugins=(foo bar mix-fast)
  20 +```
  21 +
  22 +You might consider adding `.mix_tasks` to your [global .gitignore](https://help.github.com/articles/ignoring-files#global-gitignore)
  23 +
  24 +## Usage
  25 +
  26 +`mix`, then press tab
  27 +
  28 +Currently maintained by [styx](https://github.com/styx/)
0 29 \ No newline at end of file
plugins/mix-fast/mix-fast.plugin.zsh
... ... @@ -0,0 +1,29 @@
  1 +_mix_refresh () {
  2 + if [ -f .mix_tasks ]; then
  3 + rm .mix_tasks
  4 + fi
  5 + echo "Generating .mix_tasks..." > /dev/stderr
  6 + _mix_generate
  7 + cat .mix_tasks
  8 +}
  9 +
  10 +_mix_does_task_list_need_generating () {
  11 + [ ! -f .mix_tasks ];
  12 +}
  13 +
  14 +_mix_generate () {
  15 + mix --help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
  16 +}
  17 +
  18 +_mix () {
  19 + if [ -f mix.exs ]; then
  20 + if _mix_does_task_list_need_generating; then
  21 + echo "\nGenerating .mix_tasks..." > /dev/stderr
  22 + _mix_generate
  23 + fi
  24 + compadd `cat .mix_tasks`
  25 + fi
  26 +}
  27 +
  28 +compdef _mix mix
  29 +alias mix_refresh='_mix_refresh'
1   -#compdef mix
  1 +#compdef mix
2 2 #autoload
3 3  
4 4 # Elixir mix zsh completion
5 5  
6 6 local -a _1st_arguments
7 7 _1st_arguments=(
8   - 'archive:Archive this project into a .ez file'
9   - 'clean:Clean generated application files'
  8 + 'app.start:Start all registered apps'
  9 + 'archive:List all archives'
  10 + 'archive.build:Archive this project into a .ez file'
  11 + 'archive.install:Install an archive locally'
  12 + 'archive.uninstall:Uninstall archives'
  13 + 'clean:Delete generated application files'
  14 + 'cmd:Executes the given command'
10 15 'compile:Compile source files'
  16 + 'compile.protocols:Consolidates all protocols in all paths'
11 17 'deps:List dependencies and their status'
12   - "deps.clean:Remove dependencies' files"
  18 + "deps.clean:Remove the given dependencies' files"
13 19 'deps.compile:Compile dependencies'
14 20 'deps.get:Get all out of date dependencies'
15 21 'deps.unlock:Unlock the given dependencies'
16   - 'deps.update:Update dependencies'
17   - 'do:Executes the commands separated by comma'
18   - 'escriptize:Generates an escript for the project'
  22 + 'deps.update:Update the given dependencies'
  23 + 'do:Executes the tasks separated by comma'
  24 + 'escript.build:Builds an escript for the project'
19 25 'help:Print help information for tasks'
  26 + 'hex:Print hex help information'
  27 + 'hex.config:Read or update hex config'
  28 + 'hex.docs:Publish docs for package'
  29 + 'hex.info:Print hex information'
  30 + 'hex.key:Hex API key tasks'
  31 + 'hex.outdated:Shows outdated hex deps for the current project'
  32 + 'hex.owner:Hex package ownership tasks'
  33 + 'hex.publish:Publish a new package version'
  34 + 'hex.search:Search for package names'
  35 + 'hex.user:Hex user tasks'
  36 + 'loadconfig:Loads and persists the given configuration'
20 37 'local:List local tasks'
21   - 'local.install:Install a task or an archive locally'
  38 + 'local.hex:Install hex locally'
22 39 'local.rebar:Install rebar locally'
23   - 'local.uninstall:Uninstall local tasks or archives'
24   - 'local.hex:Install Hex locally'
25   - 'new:Creates a new Elixir project'
  40 + 'new:Create a new Elixir project'
26 41 'run:Run the given file or expression'
27 42 "test:Run a project's tests"
28 43 '--help:Describe available tasks'
... ... @@ -34,7 +49,7 @@ __task_list ()
34 49 local expl
35 50 declare -a tasks
36 51  
37   - tasks=(archive clean compile deps deps.clean deps.compile deps.get deps.unlock deps.update do escriptize help local local.install local.rebar local.uninstall new run test)
  52 + tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new run test)
38 53  
39 54 _wanted tasks expl 'help' compadd $tasks
40 55 }
... ... @@ -57,7 +72,7 @@ case $state in
57 72 (options)
58 73 case $line[1] in
59 74 (help)
60   - _arguments ':feature:__task_list'
  75 + _arguments ':feature:__task_list'
61 76 esac
62 77 ;;
63 78 esac
plugins/osx/osx.plugin.zsh
... ... @@ -138,23 +138,6 @@ function man-preview() {
138 138 man -t "$@" | open -f -a Preview
139 139 }
140 140  
141   -function trash() {
142   - local trash_dir="${HOME}/.Trash"
143   - local temp_ifs="$IFS"
144   - IFS=$'\n'
145   - for item in "$@"; do
146   - if [[ -e "$item" ]]; then
147   - item_name="$(basename $item)"
148   - if [[ -e "${trash_dir}/${item_name}" ]]; then
149   - mv -f "$item" "${trash_dir}/${item_name} $(date "+%H-%M-%S")"
150   - else
151   - mv -f "$item" "${trash_dir}/"
152   - fi
153   - fi
154   - done
155   - IFS=$temp_ifs
156   -}
157   -
158 141 function vncviewer() {
159 142 open vnc://$@
160 143 }
plugins/paver/paver.plugin.zsh
... ... @@ -0,0 +1,16 @@
  1 +_paver_does_target_list_need_generating () {
  2 + [ ! -f .paver_targets ] && return 0;
  3 + [ pavement.py -nt .paver_targets ] && return 0;
  4 + return 1;
  5 +}
  6 +
  7 +_paver () {
  8 + if [ -f pavement.py ]; then
  9 + if _paver_does_target_list_need_generating; then
  10 + paver --help 2>&1 |grep '-'|grep -v -e '--'|awk -F '-' '{print $1}'|tr -d ' ' > .paver_targets
  11 + fi
  12 + compadd `cat .paver_targets`
  13 + fi
  14 +}
  15 +
  16 +compdef _paver paver
Changes suppressed. Click to show
1 1 #compdef pod
2 2 #autoload
  3 +# setopt XTRACE VERBOSE
  4 +# vim: ft=zsh sw=2 ts=2 et
  5 +
3 6  
4 7 # -----------------------------------------------------------------------------
5 8 # FILE: _pod
6   -# DESCRIPTION: Cocoapods (0.27.1) autocomplete plugin for Oh-My-Zsh
  9 +# DESCRIPTION: Cocoapods (0.33.1) autocomplete plugin for Oh-My-Zsh
7 10 # http://cocoapods.org
  11 +# Generated with `pod --completion-script
8 12 # AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch)
9 13 # GITHUB: https://github.com/mekanics
10 14 # TWITTER: @jolyAlexandre
11   -# VERSION: 0.0.3
12   -# LICENSE: MIT
  15 +# VERSION: 0.0.5
13 16 # -----------------------------------------------------------------------------
14 17  
15   -local -a _1st_arguments
16   -_1st_arguments=(
17   - 'help:Show help for the given command'
18   - 'init:Generate a Podfile for the current directory'
19   - 'install:Install project dependencies'
20   - 'ipc:Inter-process communication'
21   - 'list:List pods'
22   - 'outdated:Show outdated project dependencies'
23   - 'podfile-info:Shows information on installed Pods'
24   - 'push:Push new specifications to a spec-repo'
25   - 'repo:Manage spec-repositories'
26   - 'search:Searches for pods'
27   - 'setup:Setup the CocoaPods environment'
28   - 'spec:Manage pod specs'
29   - 'update:Update outdated project dependencies'
30   -)
31   -
32   -local -a _repo_arguments
33   -_repo_arguments=(
34   - 'add:Add a spec repo'
35   - 'lint:Validates all specs in a repo'
36   - 'remove:Remove a spec repo.'
37   - 'update:Update a spec repo'
38   -)
39   -
40   -local -a _spec_arguments
41   -_spec_arguments=(
42   - 'cat:Prints a spec file'
43   - 'create:Create spec file stub'
44   - 'edit:Edit a spec file'
45   - 'lint:Validates a spec file'
46   - 'which:Prints the path of the given spec'
47   -)
48   -
49   -local -a _ipc_arguments
50   -_ipc_arguments=(
51   - 'list:Lists the specifications know to CocoaPods'
52   - 'podfile:Converts a Podfile to YAML'
53   - 'repl:The repl listens to commands on standard input'
54   - 'spec:Converts a podspec to YAML'
55   - 'update-search-index:Updates the search index'
56   -)
57   -
58   -local -a _list_arguments
59   -_list_arguments=(
60   - 'new:Lists pods introduced in the master spec-repo since the last check'
61   -)
62   -
63   -local -a _inherited_options
64   -_inherited_options=(
65   - '(--silent)--silent[Show nothing]' \
66   - '(--version)--version[Show the version of CocoaPods]' \
67   - '(--no-color)--no-color[Show output without color]' \
68   - '(--verbose)--verbose[Show more debugging information]' \
69   - '(--help)--help[Show help banner of specified command]'
70   -)
71   -
72   -local -a _install_options
73   -_install_options=(
74   - '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \
75   - '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
76   - '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
77   -)
78   -
79   -local -a _update_options
80   -_update_options=(
81   - '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \
82   - '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
83   - '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
84   -)
85   -
86   -local -a _outdated_options
87   -_outdated_options=(
88   - '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
89   -)
90   -
91   -local -a _search_options
92   -_search_options=(
93   - '(--full)--full[Search by name, summary, and description]' \
94   - '(--stats)--stats[Show additional stats (like GitHub watchers and forks)]' \
95   - '(--ios)--ios[Restricts the search to Pods supported on iOS]' \
96   - '(--osx)--osx[Restricts the search to Pods supported on OS X]'
97   -)
98   -
99   -local -a _list_options
100   -_list_options=(
101   - '(--update)--update[Run `pod repo update` before listing]'
102   -)
103   -
104   -local -a _podfile_info_options
105   -_podfile_info_options=(
106   - '(--all)--all[Show information about all Pods with dependencies that are used in a project]' \
107   - '(--md)--md[Output information in Markdown format]' \
108   - '*:script or directory:_files'
109   -)
110   -
111   -local -a _push_options
112   -_push_options=(
113   - '(--allow-warnings)--allow-warnings[Allows pushing even if there are warnings]' \
114   - '(--local-only)--local-only[Does not perform the step of pushing REPO to its remote]' \
115   - '*:script or directory:_files'
116   -)
117   -
118   -local -a _repo_lint_options
119   -_repo_lint_options=(
120   - '(--only-errors)--only-errors[Lint presents only the errors]'
121   -)
122   -
123   -local -a _setup_options
124   -_setup_options=(
125   - '(--push)--push[Use this option to enable push access once granted]'
126   -)
127   -
128   -local -a _spec_lint_options
129   -_spec_lint_options=(
130   - '(--quick)--quick[Lint skips checks that would require to download and build the spec]' \
131   - '(--only-errors)--only-errors[Lint validates even if warnings are present]' \
132   - '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]' \
133   - '*:script or directory:_files'
134   -)
135   -
136   -local -a _spec_cat_options
137   -_spec_cat_options=(
138   - '(--show-all)--show-all[Pick from all versions of the given podspec]'
139   -)
140   -
141   -local -a _spec_which_options
142   -_spec_which_options=(
143   - '(--show-all)--show-all[Print all versions of the given podspec]'
144   -)
145   -
146   -local -a _spec_edit_options
147   -_spec_edit_options=(
148   - '(--show-all)--show-all[Pick which spec to edit from all available versions of the given podspec]'
149   -)
150   -
151   -
152   -__first_command_list ()
153   -{
154   - local expl
155   - declare -a tasks
156   -
157   - tasks=(install ipc list outdated podfile-info push repo search setup spec update)
158   -
159   - _wanted tasks expl 'help' compadd $tasks
160   -}
161   -
162   -__repo_list() {
163   - _wanted application expl 'repo' compadd $(command ls -1 ~/.cocoapods/repos 2>/dev/null | sed -e 's/ /\\ /g')
164   -}
165   -
166   -__pod-repo() {
167   - local curcontext="$curcontext" state line
168   - typeset -A opt_args
169   -
170   - _arguments -C \
171   - ':command:->command' \
172   - '*::options:->options'
173   -
174   - case $state in
175   - (command)
176   - _describe -t commands "pod repo" _repo_arguments
177   - return
178   - ;;
179   -
180   - (options)
181   - case $line[1] in
182   - (lint)
183   - _arguments \
184   - $_inherited_options \
185   - $_repo_lint_options \
186   - ':feature:__repo_list'
187   - ;;
188   -
189   - (update)
190   - _arguments \
191   - $_inherited_options \
192   - ':feature:__repo_list'
193   - ;;
194   -
195   - (add)
196   - _arguments \
197   - $_inherited_options
198   -
199   - (remove)
200   - _arguments \
201   - $_inherited_options \
202   - ':feature:__repo_list'
203   - ;;
204   - esac
205   - ;;
  18 +local -a _subcommands
  19 +local -a _options
  20 +
  21 +case "$words[2]" in
  22 + help)
  23 + case "$words[3]" in
  24 + *) # pod help
  25 + _options=(
  26 + "--help:Show help banner of specified command"
  27 + "--no-ansi:Show output without ANSI codes"
  28 + "--silent:Show nothing"
  29 + "--verbose:Show more debugging information"
  30 + )
  31 + _describe -t options "pod help options" _options
  32 + ;;
206 33 esac
207   -}
208   -
209   -__pod-spec() {
210   - local curcontext="$curcontext" state line
211   - typeset -A opt_args
212   -
213   - _arguments -C \
214   - ':command:->command' \
215   - '*::options:->options'
216   -
217   - case $state in
218   - (command)
219   - _describe -t commands "pod spec" _spec_arguments
220   - return
221   - ;;
222   -
223   - (options)
224   - case $line[1] in
225   - (create)
226   - _arguments \
227   - $_inherited_options
228   - ;;
229   -
230   - (lint)
231   - _arguments \
232   - $_inherited_options \
233   - $_spec_lint_options
234   - ;;
235   -
236   - (cat)
237   - _arguments \
238   - $_inherited_options \
239   - $_spec_cat_options
240   - ;;
241   -
242   - (which)
243   - _arguments \
244   - $_inherited_options \
245   - $_spec_which_options
246   - ;;
247   -
248   - (edit)
249   - _arguments \
250   - $_inherited_options \
251   - $_spec_edit_options
252   - ;;
253   - esac
254   - return
255   - ;;
  34 + ;;
  35 + ipc)
  36 + case "$words[3]" in
  37 + list)
  38 + case "$words[4]" in
  39 + *) # pod ipc list
  40 + _options=(
  41 + "--help:Show help banner of specified command"
  42 + "--no-ansi:Show output without ANSI codes"
  43 + "--silent:Show nothing"
  44 + "--verbose:Show more debugging information"
  45 + )
  46 + _describe -t options "pod ipc list options" _options
  47 + ;;
  48 + esac
  49 + ;;
  50 + podfile)
  51 + case "$words[4]" in
  52 + *) # pod ipc podfile
  53 + _options=(
  54 + "--help:Show help banner of specified command"
  55 + "--no-ansi:Show output without ANSI codes"
  56 + "--silent:Show nothing"
  57 + "--verbose:Show more debugging information"
  58 + )
  59 + _describe -t options "pod ipc podfile options" _options
  60 + ;;
  61 + esac
  62 + ;;
  63 + repl)
  64 + case "$words[4]" in
  65 + *) # pod ipc repl
  66 + _options=(
  67 + "--help:Show help banner of specified command"
  68 + "--no-ansi:Show output without ANSI codes"
  69 + "--silent:Show nothing"
  70 + "--verbose:Show more debugging information"
  71 + )
  72 + _describe -t options "pod ipc repl options" _options
  73 + ;;
  74 + esac
  75 + ;;
  76 + spec)
  77 + case "$words[4]" in
  78 + *) # pod ipc spec
  79 + _options=(
  80 + "--help:Show help banner of specified command"
  81 + "--no-ansi:Show output without ANSI codes"
  82 + "--silent:Show nothing"
  83 + "--verbose:Show more debugging information"
  84 + )
  85 + _describe -t options "pod ipc spec options" _options
  86 + ;;
  87 + esac
  88 + ;;
  89 + update-search-index)
  90 + case "$words[4]" in
  91 + *) # pod ipc update-search-index
  92 + _options=(
  93 + "--help:Show help banner of specified command"
  94 + "--no-ansi:Show output without ANSI codes"
  95 + "--silent:Show nothing"
  96 + "--verbose:Show more debugging information"
  97 + )
  98 + _describe -t options "pod ipc update-search-index options" _options
  99 + ;;
  100 + esac
  101 + ;;
  102 + *) # pod ipc
  103 + _subcommands=(
  104 + "list:Lists the specifications known to CocoaPods."
  105 + "podfile:Converts a Podfile to YAML."
  106 + "repl:The repl listens to commands on standard input."
  107 + "spec:Converts a podspec to JSON."
  108 + "update-search-index:Updates the search index."
  109 + )
  110 + _describe -t commands "pod ipc subcommands" _subcommands
  111 + _options=(
  112 + "--help:Show help banner of specified command"
  113 + "--no-ansi:Show output without ANSI codes"
  114 + "--silent:Show nothing"
  115 + "--verbose:Show more debugging information"
  116 + )
  117 + _describe -t options "pod ipc options" _options
  118 + ;;
256 119 esac
257   -}
258   -
259   -__pod-ipc() {
260   - local curcontext="$curcontext" state line
261   - typeset -A opt_args
262   -
263   - _arguments -C \
264   - ':command:->command' \
265   - '*::options:->options'
266   -
267   - case $state in
268   - (command)
269   - _describe -t commands "pod ipc" _ipc_arguments
270   - return
271   - ;;
272   -
273   - (options)
274   - _arguments -C \
275   - $_inherited_options
276   - return
277   - ;;
  120 + ;;
  121 + init)
  122 + case "$words[3]" in
  123 + *) # pod init
  124 + _options=(
  125 + "--help:Show help banner of specified command"
  126 + "--no-ansi:Show output without ANSI codes"
  127 + "--silent:Show nothing"
  128 + "--verbose:Show more debugging information"
  129 + )
  130 + _describe -t options "pod init options" _options
  131 + ;;
278 132 esac
279   -}
280   -
281   -__pod-list() {
282   - local curcontext="$curcontext" state line
283   - typeset -A opt_args
284   -
285   - _arguments -C \
286   - $_inherited_options \
287   - $_list_options \
288   - ':command:->command' \
289   - '*::options:->options'
290   -
291   - case $state in
292   - (command)
293   - _describe -t commands "pod list" _list_arguments
294   - return
295   - ;;
296   -
297   - (options)
298   - _arguments -C \
299   - $_inherited_options \
300   - $_list_options
301   - return
302   - ;;
  133 + ;;
  134 + install)
  135 + case "$words[3]" in
  136 + *) # pod install
  137 + _options=(
  138 + "--help:Show help banner of specified command"
  139 + "--no-ansi:Show output without ANSI codes"
  140 + "--no-clean:Leave SCM dirs like \`.git\` and \`.svn\` intact after downloading"
  141 + "--no-integrate:Skip integration of the Pods libraries in the Xcode project(s)"
  142 + "--no-repo-update:Skip running \`pod repo update\` before install"
  143 + "--silent:Show nothing"
  144 + "--verbose:Show more debugging information"
  145 + )
  146 + _describe -t options "pod install options" _options
  147 + ;;
303 148 esac
304   -}
305   -
306   -local curcontext="$curcontext" state line
307   -typeset -A opt_args
308   -
309   -_arguments -C \
310   - $_inherited_options \
311   - ':command:->command' \
312   - '*::options:->options'
313   -
314   -case $state in
315   - (command)
316   - _describe -t commands "pod" _1st_arguments
317   - return
318 149 ;;
319   -
320   - (options)
321   - case $line[1] in
322   - (help)
323   - _arguments \
324   - $_inherited_options \
325   - ':help:__first_command_list'
326   - ;;
327   -
328   - (push)
329   - _arguments \
330   - $_inherited_options \
331   - $_push_options \
332   - ':repo:__repo_list'
333   - ;;
334   -
335   - (repo)
336   - __pod-repo
337   - ;;
338   -
339   - (spec)
340   - __pod-spec
341   - ;;
342   -
343   - (ipc)
344   - __pod-ipc
345   - ;;
346   -
347   - (list)
348   - __pod-list
349   - ;;
350   -
351   - (install)
352   - _arguments \
353   - $_inherited_options \
354   - $_install_options
355   - ;;
356   -
357   - (update)
358   - _arguments \
359   - $_inherited_options \
360   - $_update_options
361   - ;;
362   -
363   - (outdated)
364   - _arguments \
365   - $_inherited_options \
366   - $_outdated_options
367   - ;;
368   -
369   - (search)
370   - _arguments \
371   - $_inherited_options \
372   - $_search_options
373   - ;;
374   -
375   - (podfile-info)
376   - _arguments \
377   - $_inherited_options \
378   - $_podfile_info_options
379   - ;;
380   -
381   - (setup)
382   - _arguments \
383   - $_inherited_options \
384   - $_setup_options
385   - ;;
386   -
  150 + lib)
  151 + case "$words[3]" in
  152 + create)
  153 + case "$words[4]" in
  154 + *) # pod lib create
  155 + _options=(
  156 + "--help:Show help banner of specified command"
  157 + "--no-ansi:Show output without ANSI codes"
  158 + "--silent:Show nothing"
  159 + "--verbose:Show more debugging information"
  160 + )
  161 + _describe -t options "pod lib create options" _options
  162 + ;;
  163 + esac
  164 + ;;
  165 + lint)
  166 + case "$words[4]" in
  167 + *) # pod lib lint
  168 + _options=(
  169 + "--help:Show help banner of specified command"
  170 + "--no-ansi:Show output without ANSI codes"
  171 + "--no-clean:Lint leaves the build directory intact for inspection"
  172 + "--no-subspecs:Lint skips validation of subspecs"
  173 + "--only-errors:Lint validates even if warnings are present"
  174 + "--quick:Lint skips checks that would require to download and build the spec"
  175 + "--silent:Show nothing"
  176 + "--subspec=NAME:Lint validates only the given subspec"
  177 + "--verbose:Show more debugging information"
  178 + )
  179 + _describe -t options "pod lib lint options" _options
  180 + ;;
  181 + esac
  182 + ;;
  183 + *) # pod lib
  184 + _subcommands=(
  185 + "create:Creates a new Pod"
  186 + "lint:Validates a Pod"
  187 + )
  188 + _describe -t commands "pod lib subcommands" _subcommands
  189 + _options=(
  190 + "--help:Show help banner of specified command"
  191 + "--no-ansi:Show output without ANSI codes"
  192 + "--silent:Show nothing"
  193 + "--verbose:Show more debugging information"
  194 + )
  195 + _describe -t options "pod lib options" _options
  196 + ;;
  197 + esac
  198 + ;;
  199 + list)
  200 + case "$words[3]" in
  201 + new)
  202 + case "$words[4]" in
  203 + *) # pod list new
  204 + _options=(
  205 + "--help:Show help banner of specified command"
  206 + "--no-ansi:Show output without ANSI codes"
  207 + "--silent:Show nothing"
  208 + "--update:Run \`pod repo update\` before listing"
  209 + "--verbose:Show more debugging information"
  210 + )
  211 + _describe -t options "pod list new options" _options
  212 + ;;
  213 + esac
  214 + ;;
  215 + *) # pod list
  216 + _subcommands=(
  217 + "new:Lists pods introduced in the master spec-repo since the last check"
  218 + )
  219 + _describe -t commands "pod list subcommands" _subcommands
  220 + _options=(
  221 + "--help:Show help banner of specified command"
  222 + "--no-ansi:Show output without ANSI codes"
  223 + "--silent:Show nothing"
  224 + "--update:Run \`pod repo update\` before listing"
  225 + "--verbose:Show more debugging information"
  226 + )
  227 + _describe -t options "pod list options" _options
  228 + ;;
  229 + esac
  230 + ;;
  231 + outdated)
  232 + case "$words[3]" in
  233 + *) # pod outdated
  234 + _options=(
  235 + "--help:Show help banner of specified command"
  236 + "--no-ansi:Show output without ANSI codes"
  237 + "--no-repo-update:Skip running \`pod repo update\` before install"
  238 + "--silent:Show nothing"
  239 + "--verbose:Show more debugging information"
  240 + )
  241 + _describe -t options "pod outdated options" _options
  242 + ;;
  243 + esac
  244 + ;;
  245 + plugins)
  246 + case "$words[3]" in
  247 + create)
  248 + case "$words[4]" in
  249 + *) # pod plugins create
  250 + _options=(
  251 + "--help:Show help banner of specified command"
  252 + "--no-ansi:Show output without ANSI codes"
  253 + "--silent:Show nothing"
  254 + "--verbose:Show more debugging information"
  255 + )
  256 + _describe -t options "pod plugins create options" _options
  257 + ;;
  258 + esac
  259 + ;;
  260 + list)
  261 + case "$words[4]" in
  262 + *) # pod plugins list
  263 + _options=(
  264 + "--help:Show help banner of specified command"
  265 + "--no-ansi:Show output without ANSI codes"
  266 + "--verbose:Show more debugging information"
  267 + )
  268 + _describe -t options "pod plugins list options" _options
  269 + ;;
  270 + esac
  271 + ;;
  272 + search)
  273 + case "$words[4]" in
  274 + *) # pod plugins search
  275 + _options=(
  276 + "--full:Search by name, author, and description"
  277 + "--help:Show help banner of specified command"
  278 + "--no-ansi:Show output without ANSI codes"
  279 + "--verbose:Show more debugging information"
  280 + )
  281 + _describe -t options "pod plugins search options" _options
  282 + ;;
  283 + esac
  284 + ;;
  285 + *) # pod plugins
  286 + _subcommands=(
  287 + "create:Creates a new plugin"
  288 + "list:List all known plugins"
  289 + "search:Search for known plugins"
  290 + )
  291 + _describe -t commands "pod plugins subcommands" _subcommands
  292 + _options=(
  293 + "--help:Show help banner of specified command"
  294 + "--no-ansi:Show output without ANSI codes"
  295 + "--silent:Show nothing"
  296 + "--verbose:Show more debugging information"
  297 + )
  298 + _describe -t options "pod plugins options" _options
  299 + ;;
  300 + esac
  301 + ;;
  302 + push)
  303 + case "$words[3]" in
  304 + *) # pod push
  305 + _options=(
  306 + "--help:Show help banner of specified command"
  307 + "--no-ansi:Show output without ANSI codes"
  308 + "--silent:Show nothing"
  309 + "--verbose:Show more debugging information"
  310 + )
  311 + _describe -t options "pod push options" _options
  312 + ;;
  313 + esac
  314 + ;;
  315 + repo)
  316 + case "$words[3]" in
  317 + add)
  318 + case "$words[4]" in
  319 + *) # pod repo add
  320 + _options=(
  321 + "--help:Show help banner of specified command"
  322 + "--no-ansi:Show output without ANSI codes"
  323 + "--shallow:Create a shallow clone (fast clone, but no push capabilities)"
  324 + "--silent:Show nothing"
  325 + "--verbose:Show more debugging information"
  326 + )
  327 + _describe -t options "pod repo add options" _options
  328 + ;;
  329 + esac
  330 + ;;
  331 + lint)
  332 + case "$words[4]" in
  333 + *) # pod repo lint
  334 + _options=(
  335 + "--help:Show help banner of specified command"
  336 + "--no-ansi:Show output without ANSI codes"
  337 + "--only-errors:Lint presents only the errors"
  338 + "--silent:Show nothing"
  339 + "--verbose:Show more debugging information"
  340 + )
  341 + _describe -t options "pod repo lint options" _options
  342 + ;;
  343 + esac
  344 + ;;
  345 + push)
  346 + case "$words[4]" in
  347 + *) # pod repo push
  348 + _options=(
  349 + "--allow-warnings:Allows pushing even if there are warnings"
  350 + "--help:Show help banner of specified command"
  351 + "--local-only:Does not perform the step of pushing REPO to its remote"
  352 + "--no-ansi:Show output without ANSI codes"
  353 + "--silent:Show nothing"
  354 + "--verbose:Show more debugging information"
  355 + )
  356 + _describe -t options "pod repo push options" _options
  357 + ;;
  358 + esac
  359 + ;;
  360 + remove)
  361 + case "$words[4]" in
  362 + *) # pod repo remove
  363 + _options=(
  364 + "--help:Show help banner of specified command"
  365 + "--no-ansi:Show output without ANSI codes"
  366 + "--silent:Show nothing"
  367 + "--verbose:Show more debugging information"
  368 + )
  369 + _describe -t options "pod repo remove options" _options
  370 + ;;
  371 + esac
  372 + ;;
  373 + update)
  374 + case "$words[4]" in
  375 + *) # pod repo update
  376 + _options=(
  377 + "--help:Show help banner of specified command"
  378 + "--no-ansi:Show output without ANSI codes"
  379 + "--silent:Show nothing"
  380 + "--verbose:Show more debugging information"
  381 + )
  382 + _describe -t options "pod repo update options" _options
  383 + ;;
  384 + esac
  385 + ;;
  386 + *) # pod repo
  387 + _subcommands=(
  388 + "add:Add a spec repo."
  389 + "lint:Validates all specs in a repo."
  390 + "push:Push new specifications to a spec-repo"
  391 + "remove:Remove a spec repo"
  392 + "update:Update a spec repo."
  393 + )
  394 + _describe -t commands "pod repo subcommands" _subcommands
  395 + _options=(
  396 + "--help:Show help banner of specified command"
  397 + "--no-ansi:Show output without ANSI codes"
  398 + "--silent:Show nothing"
  399 + "--verbose:Show more debugging information"
  400 + )
  401 + _describe -t options "pod repo options" _options
  402 + ;;
387 403 esac
388 404 ;;
  405 + search)
  406 + case "$words[3]" in
  407 + *) # pod search
  408 + _options=(
  409 + "--full:Search by name, summary, and description"
  410 + "--help:Show help banner of specified command"
  411 + "--ios:Restricts the search to Pods supported on iOS"
  412 + "--no-ansi:Show output without ANSI codes"
  413 + "--osx:Restricts the search to Pods supported on OS X"
  414 + "--stats:Show additional stats (like GitHub watchers and forks)"
  415 + "--verbose:Show more debugging information"
  416 + "--web:Searches on cocoapods.org"
  417 + )
  418 + _describe -t options "pod search options" _options
  419 + ;;
  420 + esac
  421 + ;;
  422 + setup)
  423 + case "$words[3]" in
  424 + *) # pod setup
  425 + _options=(
  426 + "--help:Show help banner of specified command"
  427 + "--no-ansi:Show output without ANSI codes"
  428 + "--no-shallow:Clone full history so push will work"
  429 + "--push:Use this option to enable push access once granted"
  430 + "--silent:Show nothing"
  431 + "--verbose:Show more debugging information"
  432 + )
  433 + _describe -t options "pod setup options" _options
  434 + ;;
  435 + esac
  436 + ;;
  437 + spec)
  438 + case "$words[3]" in
  439 + cat)
  440 + case "$words[4]" in
  441 + *) # pod spec cat
  442 + _options=(
  443 + "--help:Show help banner of specified command"
  444 + "--no-ansi:Show output without ANSI codes"
  445 + "--show-all:Pick from all versions of the given podspec"
  446 + "--silent:Show nothing"
  447 + "--verbose:Show more debugging information"
  448 + )
  449 + _describe -t options "pod spec cat options" _options
  450 + ;;
  451 + esac
  452 + ;;
  453 + create)
  454 + case "$words[4]" in
  455 + *) # pod spec create
  456 + _options=(
  457 + "--help:Show help banner of specified command"
  458 + "--no-ansi:Show output without ANSI codes"
  459 + "--silent:Show nothing"
  460 + "--verbose:Show more debugging information"
  461 + )
  462 + _describe -t options "pod spec create options" _options
  463 + ;;
  464 + esac
  465 + ;;
  466 + edit)
  467 + case "$words[4]" in
  468 + *) # pod spec edit
  469 + _options=(
  470 + "--help:Show help banner of specified command"
  471 + "--no-ansi:Show output without ANSI codes"
  472 + "--show-all:Pick which spec to edit from all available versions of the given podspec"
  473 + "--silent:Show nothing"
  474 + "--verbose:Show more debugging information"
  475 + )
  476 + _describe -t options "pod spec edit options" _options
  477 + ;;
  478 + esac
  479 + ;;
  480 + lint)
  481 + case "$words[4]" in
  482 + *) # pod spec lint
  483 + _options=(
  484 + "--help:Show help banner of specified command"
  485 + "--no-ansi:Show output without ANSI codes"
  486 + "--no-clean:Lint leaves the build directory intact for inspection"
  487 + "--no-subspecs:Lint skips validation of subspecs"
  488 + "--only-errors:Lint validates even if warnings are present"
  489 + "--quick:Lint skips checks that would require to download and build the spec"
  490 + "--silent:Show nothing"
  491 + "--subspec=NAME:Lint validates only the given subspec"
  492 + "--verbose:Show more debugging information"
  493 + )
  494 + _describe -t options "pod spec lint options" _options
  495 + ;;
  496 + esac
  497 + ;;
  498 + which)
  499 + case "$words[4]" in
  500 + *) # pod spec which
  501 + _options=(
  502 + "--help:Show help banner of specified command"
  503 + "--no-ansi:Show output without ANSI codes"
  504 + "--show-all:Print all versions of the given podspec"
  505 + "--silent:Show nothing"
  506 + "--verbose:Show more debugging information"
  507 + )
  508 + _describe -t options "pod spec which options" _options
  509 + ;;
  510 + esac
  511 + ;;
  512 + *) # pod spec
  513 + _subcommands=(
  514 + "cat:Prints a spec file."
  515 + "create:Create spec file stub."
  516 + "edit:Edit a spec file."
  517 + "lint:Validates a spec file."
  518 + "which:Prints the path of the given spec."
  519 + )
  520 + _describe -t commands "pod spec subcommands" _subcommands
  521 + _options=(
  522 + "--help:Show help banner of specified command"
  523 + "--no-ansi:Show output without ANSI codes"
  524 + "--silent:Show nothing"
  525 + "--verbose:Show more debugging information"
  526 + )
  527 + _describe -t options "pod spec options" _options
  528 + ;;
  529 + esac
  530 + ;;
  531 + trunk)
  532 + case "$words[3]" in
  533 + add-owner)
  534 + case "$words[4]" in
  535 + *) # pod trunk add-owner
  536 + _options=(
  537 + "--help:Show help banner of specified command"
  538 + "--no-ansi:Show output without ANSI codes"
  539 + "--silent:Show nothing"
  540 + "--verbose:Show more debugging information"
  541 + )
  542 + _describe -t options "pod trunk add-owner options" _options
  543 + ;;
  544 + esac
  545 + ;;
  546 + me)
  547 + case "$words[4]" in
  548 + clean-sessions)
  549 + case "$words[5]" in
  550 + *) # pod trunk me clean-sessions
  551 + _options=(
  552 + "--all:Removes all your sessions, except for the current one"
  553 + "--help:Show help banner of specified command"
  554 + "--no-ansi:Show output without ANSI codes"
  555 + "--silent:Show nothing"
  556 + "--verbose:Show more debugging information"
  557 + )
  558 + _describe -t options "pod trunk me clean-sessions options" _options
  559 + ;;
  560 + esac
  561 + ;;
  562 + *) # pod trunk me
  563 + _subcommands=(
  564 + "clean-sessions:Remove sessions"
  565 + )
  566 + _describe -t commands "pod trunk me subcommands" _subcommands
  567 + _options=(
  568 + "--help:Show help banner of specified command"
  569 + "--no-ansi:Show output without ANSI codes"
  570 + "--silent:Show nothing"
  571 + "--verbose:Show more debugging information"
  572 + )
  573 + _describe -t options "pod trunk me options" _options
  574 + ;;
  575 + esac
  576 + ;;
  577 + push)
  578 + case "$words[4]" in
  579 + *) # pod trunk push
  580 + _options=(
  581 + "--allow-warnings:Allows push even if there are lint warnings"
  582 + "--help:Show help banner of specified command"
  583 + "--no-ansi:Show output without ANSI codes"
  584 + "--silent:Show nothing"
  585 + "--verbose:Show more debugging information"
  586 + )
  587 + _describe -t options "pod trunk push options" _options
  588 + ;;
  589 + esac
  590 + ;;
  591 + register)
  592 + case "$words[4]" in
  593 + *) # pod trunk register
  594 + _options=(
  595 + "--description=DESCRIPTION:An arbitrary description to easily identify your session later on."
  596 + "--help:Show help banner of specified command"
  597 + "--no-ansi:Show output without ANSI codes"
  598 + "--silent:Show nothing"
  599 + "--verbose:Show more debugging information"
  600 + )
  601 + _describe -t options "pod trunk register options" _options
  602 + ;;
  603 + esac
  604 + ;;
  605 + *) # pod trunk
  606 + _subcommands=(
  607 + "add-owner:Add an owner to a pod"
  608 + "me:Display information about your sessions"
  609 + "push:Publish a podspec"
  610 + "register:Manage sessions"
  611 + )
  612 + _describe -t commands "pod trunk subcommands" _subcommands
  613 + _options=(
  614 + "--help:Show help banner of specified command"
  615 + "--no-ansi:Show output without ANSI codes"
  616 + "--silent:Show nothing"
  617 + "--verbose:Show more debugging information"
  618 + )
  619 + _describe -t options "pod trunk options" _options
  620 + ;;
  621 + esac
  622 + ;;
  623 + try)
  624 + case "$words[3]" in
  625 + *) # pod try
  626 + _options=(
  627 + "--help:Show help banner of specified command"
  628 + "--no-ansi:Show output without ANSI codes"
  629 + "--silent:Show nothing"
  630 + "--verbose:Show more debugging information"
  631 + )
  632 + _describe -t options "pod try options" _options
  633 + ;;
  634 + esac
  635 + ;;
  636 + update)
  637 + case "$words[3]" in
  638 + *) # pod update
  639 + _options=(
  640 + "--help:Show help banner of specified command"
  641 + "--no-ansi:Show output without ANSI codes"
  642 + "--no-clean:Leave SCM dirs like \`.git\` and \`.svn\` intact after downloading"
  643 + "--no-integrate:Skip integration of the Pods libraries in the Xcode project(s)"
  644 + "--no-repo-update:Skip running \`pod repo update\` before install"
  645 + "--silent:Show nothing"
  646 + "--verbose:Show more debugging information"
  647 + )
  648 + _describe -t options "pod update options" _options
  649 + ;;
  650 + esac
  651 + ;;
  652 + *) # pod
  653 + _subcommands=(
  654 + "help:Show help for the given command."
  655 + "ipc:Inter-process communication"
  656 + "init:Generate a Podfile for the current directory."
  657 + "install:Install project dependencies"
  658 + "lib:Develop pods"
  659 + "list:List pods"
  660 + "outdated:Show outdated project dependencies"
  661 + "plugins:Show available CocoaPods plugins"
  662 + "push:Temporary alias for the \`pod repo push\` command"
  663 + "repo:Manage spec-repositories"
  664 + "search:Searches for pods"
  665 + "setup:Setup the CocoaPods environment"
  666 + "spec:Manage pod specs"
  667 + "trunk:Interact with the CocoaPods API (e.g. publishing new specs)"
  668 + "try:Try a Pod!"
  669 + "update:Update outdated project dependencies"
  670 + )
  671 + _describe -t commands "pod subcommands" _subcommands
  672 + _options=(
  673 + "--completion-script:Print the auto-completion script"
  674 + "--help:Show help banner of specified command"
  675 + "--no-ansi:Show output without ANSI codes"
  676 + "--silent:Show nothing"
  677 + "--verbose:Show more debugging information"
  678 + "--version:Show the version of the tool"
  679 + )
  680 + _describe -t options "pod options" _options
  681 + ;;
389 682 esac
plugins/rails/rails.plugin.zsh
... ... @@ -50,6 +50,7 @@ alias rdr=&#39;rake db:rollback&#39;
50 50 alias rdc='rake db:create'
51 51 alias rds='rake db:seed'
52 52 alias rdd='rake db:drop'
  53 +alias rdrs='rake db:reset'
53 54 alias rdtc='rake db:test:clone'
54 55 alias rdtp='rake db:test:prepare'
55 56 alias rdmtc='rake db:migrate db:test:clone'
... ... @@ -59,7 +60,7 @@ alias rn=&#39;rake notes&#39;
59 60 alias rr='rake routes'
60 61  
61 62 # legacy stuff
62   -alias ss='thin --stats "/thin/stats" start'
  63 +alias sstat='thin --stats "/thin/stats" start'
63 64 alias sg='ruby script/generate'
64 65 alias sd='ruby script/destroy'
65 66 alias sp='ruby script/plugin'
plugins/rails3/rails3.plugin.zsh
... ... @@ -1,4 +0,0 @@
1   -echo "It looks like you have been using the 'rails3' plugin,"
2   -echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
3   -echo "You will want to modify your ~/.zshrc configuration to begin using it."
4   -echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
plugins/rails4/rails4.plugin.zsh
... ... @@ -1,4 +0,0 @@
1   -echo "It looks like you have been using the 'rails4' plugin,"
2   -echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
3   -echo "You will want to modify your ~/.zshrc configuration to begin using it."
4   -echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
plugins/sublime/README.md
... ... @@ -14,4 +14,6 @@ Plugin for Sublime Text, a cross platform text and code editor, available for Li
14 14  
15 15 * If `st` is passed a file, open it in Sublime Text
16 16  
17   - * if `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text
18 17 \ No newline at end of file
  18 + * If `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text
  19 +
  20 + * If `sst` command is called, it is like `sudo st`, opening the file or folder in Sublime Text. Useful for editing system protected files.
19 21 \ No newline at end of file
plugins/sublime/sublime.plugin.zsh
... ... @@ -5,9 +5,12 @@ if [[ $(&#39;uname&#39;) == &#39;Linux&#39; ]]; then
5 5 _sublime_linux_paths=(
6 6 "$HOME/bin/sublime_text"
7 7 "/opt/sublime_text/sublime_text"
  8 + "/opt/sublime_text_3/sublime_text"
8 9 "/usr/bin/sublime_text"
9 10 "/usr/local/bin/sublime_text"
10 11 "/usr/bin/subl"
  12 + "/opt/sublime_text_3/sublime_text"
  13 + "/usr/bin/subl3"
11 14 )
12 15 for _sublime_path in $_sublime_linux_paths; do
13 16 if [[ -a $_sublime_path ]]; then
... ... @@ -33,7 +36,7 @@ elif [[ &quot;$OSTYPE&quot; = darwin* ]]; then
33 36  
34 37 for _sublime_path in $_sublime_darwin_paths; do
35 38 if [[ -a $_sublime_path ]]; then
36   - alias subl="'$_sublime_path'"
  39 + subl () { "$_sublime_path" $* }
37 40 alias st=subl
38 41 break
39 42 fi
plugins/taskwarrior/taskwarrior.plugin.zsh
... ... @@ -8,7 +8,7 @@
8 8 # TaskWarrior<http://taskwarrior.org/>. It uses the zsh tab completion
9 9 # script (_task) distributed with TaskWarrior for the completion definitions.
10 10 #
11   -# Typing task[tabtab] will give you a list of current tasks, task 66[tabtab]
  11 +# Typing task [tabtab] will give you a list of current tasks, task 66[tabtab]
12 12 # gives a list of available modifications for that task, etc.
13 13 ################################################################################
14 14  
plugins/tugboat/_tugboat
... ... @@ -0,0 +1,106 @@
  1 +#compdef tugboat
  2 +#autoload
  3 +
  4 +# Tugboat zsh autocompletion
  5 +
  6 +
  7 +local -a _commands
  8 +_commands=(
  9 + 'add-key:[NAME] Upload an ssh public key.'
  10 + 'authorize:Authorize a DigitalOcean account with tugboat.'
  11 + 'create:[NAME] Create a droplet.'
  12 + 'destroy:[FUZZY_NAME] Destroy a droplet.'
  13 + 'destroy_image:[FUZZY_NAME] Destroy an image.'
  14 + 'droplets:Retrieve a list of your droplets.'
  15 + 'halt:[FUZZY_NAME] Shutdown a droplet.'
  16 + 'help:[COMMAND] Describe commands or a specific command.'
  17 + 'images:Retrieve a list of your images.'
  18 + 'info:[FUZZY_NAME] [OPTIONS] Show a droplets information.'
  19 + 'info_image:[FUZZY_NAME] [OPTIONS] Show an images information.'
  20 + 'keys:Show available SSH keys.'
  21 + 'password-reset:[FUZZY_NAME] Reset root password.'
  22 + 'rebuild:[FUZZY_NAME] [IMAGE_NAME] Rebuild a droplet.'
  23 + 'regions:Show regions.'
  24 + 'resize:[FUZZY_NAME -s, --size=N] Resize a droplet.'
  25 + 'restart:[FUZZY_NAME] Restart a droplet.'
  26 + 'sizes:Show available droplet sizes.'
  27 + 'snapshot:[SNAPSHOT_NAME] [FUZZY_NAME] [OPTIONS] Queue a snapshot of the droplet.'
  28 + 'ssh:[FUZZY_NAME] SSH into a droplet.'
  29 + 'start:[FUZZY_NAME] Start a droplet.'
  30 + 'verify:Check your DigitalOcean credentials.'
  31 + 'version:Show version.'
  32 + 'wait:[FUZZY_NAME] Wait for a droplet to reach a state.'
  33 +)
  34 +
  35 +local -a _create_arguments
  36 +_create_arguments=(
  37 + '-s:[--size=N] The size_id of the droplet'
  38 + '-i:[--image=N] The image_id of the droplet'
  39 + '-r:[--region=N] The region_id of the droplet'
  40 + '-k:[--keys=KEYS] A comma separated list of SSH key ids to add to the droplet'
  41 + '-p:[--private-networking] Enable private networking on the droplet'
  42 + '-b:[--backups-enabled] Enable backups on the droplet'
  43 + '-q:[--quiet]'
  44 +)
  45 +
  46 +__task_list ()
  47 +{
  48 + local expl
  49 + declare -a tasks
  50 +
  51 + arguments=(add-key authorize create destroy destroy_image droplets halt help images info info_image keys password-reset rebuild regions resize restart sizes snapshot ssh start verify version wait)
  52 +
  53 + _wanted tasks expl 'help' compadd $arguments
  54 +}
  55 +
  56 +__droplets_list ()
  57 +{
  58 + _wanted application expl 'command' compadd $(command tugboat droplets | cut -d " " -f1)
  59 +}
  60 +
  61 +__tugboat-create ()
  62 +{
  63 + local curcontext="$curcontext" state line
  64 + typeset -A opt_args
  65 +
  66 + _arguments -C \
  67 + ':command:->command' \
  68 + '*::options:->options'
  69 +
  70 + case $state in
  71 + (command)
  72 + _describe -t commands "gem subcommand" _create_arguments
  73 + return
  74 + ;;
  75 + esac
  76 +}
  77 +
  78 +local curcontext="$curcontext" state line
  79 +typeset -A opt_args
  80 +
  81 +_arguments -C \
  82 + ':command:->command' \
  83 + '*::options:->options'
  84 +
  85 +case $state in
  86 + (command)
  87 + _describe -t commands "gem subcommand" _commands
  88 + return
  89 + ;;
  90 +
  91 + (options)
  92 + case $line[1] in
  93 + (help)
  94 + _arguments ':feature:__task_list'
  95 + ;;
  96 +
  97 + (ssh)
  98 + _arguments ':feature:__droplets_list'
  99 + ;;
  100 +
  101 + (create)
  102 + _arguments ':feature:__tugboat-create'
  103 + ;;
  104 + esac
  105 + ;;
  106 +esac
plugins/vi-mode/README.md
... ... @@ -0,0 +1,75 @@
  1 +vi-mode
  2 +=======
  3 +This plugin increase `vi-like` zsh functionality.
  4 +
  5 +Use `ESC` or `CTRL-[` to enter `Normal mode`.
  6 +
  7 +
  8 +History
  9 +-------
  10 +
  11 +- `ctrl-p` : Previous command in history
  12 +- `ctrl-n` : Next command in history
  13 +- `/` : Search backward in history
  14 +- `n` : Repeat the last `/`
  15 +
  16 +
  17 +Mode indicators
  18 +---------------
  19 +
  20 +*Normal mode* is indicated with red `<<<` mark at the right prompt, when it
  21 +wasn't defined by theme.
  22 +
  23 +
  24 +Vim edition
  25 +-----------
  26 +
  27 +- `v` : Edit current command line in Vim
  28 +
  29 +
  30 +Movement
  31 +--------
  32 +
  33 +- `$` : To the end of the line
  34 +- `^` : To the first non-blank character of the line
  35 +- `0` : To the first character of the line
  36 +- `w` : [count] words forward
  37 +- `W` : [count] WORDS forward
  38 +- `e` : Forward to the end of word [count] inclusive
  39 +- `E` : Forward to the end of WORD [count] inclusive
  40 +- `b` : [count] words backward
  41 +- `B` : [count] WORDS backward
  42 +- `t{char}` : Till before [count]'th occurrence of {char} to the right
  43 +- `T{char}` : Till before [count]'th occurrence of {char} to the left
  44 +- `f{char}` : To [count]'th occurrence of {char} to the right
  45 +- `F{char}` : To [count]'th occurrence of {char} to the left
  46 +- `;` : Repeat latest f, t, F or T [count] times
  47 +- `,` : Repeat latest f, t, F or T in opposite direction
  48 +
  49 +
  50 +Insertion
  51 +---------
  52 +
  53 +- `i` : Insert text before the cursor
  54 +- `I` : Insert text before the first character in the line
  55 +- `a` : Append text after the cursor
  56 +- `A` : Append text at the end of the line
  57 +- `o` : Insert new command line below the current one
  58 +- `O` : Insert new command line above the current one
  59 +
  60 +
  61 +Delete and Insert
  62 +-----------------
  63 +
  64 +- `ctrl-h` : While in *Insert mode*: delete character after the cursor
  65 +- `ctrl-w` : While in *Insert mode*: delete word after the cursor
  66 +- `d{motion}` : Delete text that {motion} moves over
  67 +- `dd` : Delete line
  68 +- `D` : Delete characters under the cursor until the end of the line
  69 +- `c{motion}` : Delete {motion} text and start insert
  70 +- `cc` : Delete line and start insert
  71 +- `C` : Delete to the end of the line and start insert
  72 +- `r{char}` : Replace the character under the cursor with {char}
  73 +- `R` : Enter replace mode: Each character replaces existing one
  74 +- `x` : Delete [count] characters under and after the cursor
  75 +- `X` : Delete [count] characters before the cursor
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
1 1 virtualenvwrapper='virtualenvwrapper.sh'
2 2  
3 3 if (( $+commands[$virtualenvwrapper] )); then
4   - source ${${virtualenvwrapper}:c}
  4 + function {
  5 + setopt local_options
  6 + unsetopt equals
  7 + source ${${virtualenvwrapper}:c}
  8 + }
5 9 elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
6   - virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
7   - source "/etc/bash_completion.d/virtualenvwrapper"
  10 + function {
  11 + setopt local_options
  12 + unsetopt equals
  13 + virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
  14 + source "/etc/bash_completion.d/virtualenvwrapper"
  15 + }
8 16 else
9 17 print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
10 18 "Please install with \`pip install virtualenvwrapper\`" >&2
... ... @@ -29,8 +37,11 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
29 37 if [ ! $WORKON_CWD ]; then
30 38 WORKON_CWD=1
31 39 # Check if this is a Git repo
32   - PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null`
33   - if (( $? != 0 )); then
  40 + PROJECT_ROOT=`pwd`
  41 + while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do
  42 + PROJECT_ROOT=`realpath $PROJECT_ROOT/..`
  43 + done
  44 + if [[ "$PROJECT_ROOT" == "/" ]]; then
34 45 PROJECT_ROOT="."
35 46 fi
36 47 # Check for virtualenv name override
plugins/vundle/vundle.plugin.zsh
... ... @@ -13,15 +13,15 @@ function vundle-init () {
13 13  
14 14 function vundle () {
15 15 vundle-init
16   - vim -c "execute \"BundleInstall\" | q | q"
  16 + vim -c "execute \"PluginInstall\" | q | q"
17 17 }
18 18  
19 19 function vundle-update () {
20 20 vundle-init
21   - vim -c "execute \"BundleInstall!\" | q | q"
  21 + vim -c "execute \"PluginInstall!\" | q | q"
22 22 }
23 23  
24 24 function vundle-clean () {
25 25 vundle-init
26   - vim -c "execute \"BundleClean!\" | q | q"
  26 + vim -c "execute \"PluginClean!\" | q | q"
27 27 }
plugins/web-search/web-search.plugin.zsh
... ... @@ -11,6 +11,7 @@ function web_search() {
11 11 yahoo "https://search.yahoo.com/search?p="
12 12 duckduckgo "https://www.duckduckgo.com/?q="
13 13 yandex "https://yandex.ru/yandsearch?text="
  14 + github "https://github.com/search?q="
14 15 )
15 16  
16 17 # define the open command
... ... @@ -49,6 +50,7 @@ alias google=&#39;web_search google&#39;
49 50 alias yahoo='web_search yahoo'
50 51 alias ddg='web_search duckduckgo'
51 52 alias yandex='web_search yandex'
  53 +alias github='web_search github'
52 54  
53 55 #add your own !bang searches here
54 56 alias wiki='web_search duckduckgo \!w'
plugins/zeus/README.md
... ... @@ -42,12 +42,15 @@
42 42 * `zsw` aliases `rm .zeus.sock`
43 43 * `zweep` aliases `rm .zeus.sock`
44 44  
45   -`zdbr` aliases `zeus rake db:reset db:test:prepare`
46   -`zdbreset` aliases `zeus rake db:reset db:test:prepare`
  45 +* `zdbr` aliases `zeus rake db:reset db:test:prepare`
  46 +* `zdbreset` aliases `zeus rake db:reset db:test:prepare`
47 47  
48   -`zdbm` aliases `zeus rake db:migrate db:test:prepare`
49   -`zdbmigrate` aliases `zeus rake db:migrate db:test:prepare`
  48 +* `zdbm` aliases `zeus rake db:migrate db:test:prepare`
  49 +* `zdbmigrate` aliases `zeus rake db:migrate db:test:prepare`
50 50  
51   -`zdbc` aliases `zeus rake db:create`
  51 +* `zdbc` aliases `zeus rake db:create`
52 52  
53   -`zdbcm` aliases `zeus rake db:create db:migrate db:test:prepare`
  53 +* `zdbcm` aliases `zeus rake db:create db:migrate db:test:prepare`
  54 +
  55 +## Installation
  56 +Add zeus to the plugins line of your `.zshconfig` file (e.g. `plugins=(rails git zeus)`)
plugins/zeus/zeus.plugin.zsh
... ... @@ -19,8 +19,8 @@ alias zsr=&#39;zeus server&#39;
19 19 alias zerver='zeus server'
20 20  
21 21 # Rake
22   -alias zr='zeus rake'
23   -alias zake='zeus rake'
  22 +alias zr='noglob zeus rake'
  23 +alias zake='noglob zeus rake'
24 24  
25 25 # Generate
26 26 alias zg='zeus generate'
templates/zshrc.zsh-template
... ... @@ -10,6 +10,10 @@ ZSH_THEME=&quot;robbyrussell&quot;
10 10 # Uncomment the following line to use case-sensitive completion.
11 11 # CASE_SENSITIVE="true"
12 12  
  13 +# Uncomment the following line to use hyphen-insensitive completion. Case
  14 +# sensitive completion must be off. _ and - will be interchangeable.
  15 +# HYPHEN_INSENSITIVE="true"
  16 +
13 17 # Uncomment the following line to disable bi-weekly auto-update checks.
14 18 # DISABLE_AUTO_UPDATE="true"
15 19  
themes/adben.zsh-theme
... ... @@ -42,7 +42,7 @@ GREEN_BASE_START=&quot;${PR_RESET}${PR_GREY}&gt;${PR_RESET}${PR_GREEN}&gt;${PR_BRIGHT_GREEN
42 42 GREEN_START_P1="${PR_RESET}${GREEN_BASE_START}${PR_RESET} "
43 43 DIVISION="${PR_RESET}${PR_RED} < ${PR_RESET}"
44 44 VCS_DIRTY_COLOR="${PR_RESET}${PR_YELLOW}"
45   -Vcs_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
  45 +VCS_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
46 46 VCS_SUFIX_COLOR="${PR_RESET}${PR_RED}› ${PR_RESET}"
47 47 # ########## COLOR ###########
48 48 # ########## SVN ###########
themes/agnoster.zsh-theme
... ... @@ -26,7 +26,13 @@
26 26 # A few utility functions to make it easy and re-usable to draw segmented prompts
27 27  
28 28 CURRENT_BG='NONE'
29   -SEGMENT_SEPARATOR=''
  29 +
  30 +# Fix odd char on mac
  31 +if [[ `uname` == 'Darwin' ]]; then
  32 + SEGMENT_SEPARATOR='\ue0b0'
  33 +else
  34 + SEGMENT_SEPARATOR=''
  35 +fi
30 36  
31 37 # Begin a segment
32 38 # Takes two arguments, background and foreground. Both can be omitted,
... ... @@ -126,7 +132,7 @@ prompt_hg() {
126 132 if `hg st | grep -q "^\?"`; then
127 133 prompt_segment red black
128 134 st='±'
129   - elif `hg st | grep -q "^(M|A)"`; then
  135 + elif `hg st | grep -q "^[MA]"`; then
130 136 prompt_segment yellow black
131 137 st='±'
132 138 else
themes/avit.zsh-theme
... ... @@ -38,34 +38,32 @@ function _ruby_version() {
38 38 # Determine the time since last commit. If branch is clean,
39 39 # use a neutral color, otherwise colors will vary according to time.
40 40 function _git_time_since_commit() {
41   - if git rev-parse --git-dir > /dev/null 2>&1; then
42   - # Only proceed if there is actually a commit.
43   - if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
44   - # Get the last commit.
45   - last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
46   - now=$(date +%s)
47   - seconds_since_last_commit=$((now-last_commit))
48   -
49   - # Totals
50   - minutes=$((seconds_since_last_commit / 60))
51   - hours=$((seconds_since_last_commit/3600))
52   -
53   - # Sub-hours and sub-minutes
54   - days=$((seconds_since_last_commit / 86400))
55   - sub_hours=$((hours % 24))
56   - sub_minutes=$((minutes % 60))
57   -
58   - if [ $hours -gt 24 ]; then
59   - commit_age="${days}d"
60   - elif [ $minutes -gt 60 ]; then
61   - commit_age="${sub_hours}h${sub_minutes}m"
62   - else
63   - commit_age="${minutes}m"
64   - fi
65   -
66   - color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
67   - echo "$color$commit_age%{$reset_color%}"
  41 +# Only proceed if there is actually a commit.
  42 + if git log -1 > /dev/null 2>&1; then
  43 + # Get the last commit.
  44 + last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
  45 + now=$(date +%s)
  46 + seconds_since_last_commit=$((now-last_commit))
  47 +
  48 + # Totals
  49 + minutes=$((seconds_since_last_commit / 60))
  50 + hours=$((seconds_since_last_commit/3600))
  51 +
  52 + # Sub-hours and sub-minutes
  53 + days=$((seconds_since_last_commit / 86400))
  54 + sub_hours=$((hours % 24))
  55 + sub_minutes=$((minutes % 60))
  56 +
  57 + if [ $hours -gt 24 ]; then
  58 + commit_age="${days}d"
  59 + elif [ $minutes -gt 60 ]; then
  60 + commit_age="${sub_hours}h${sub_minutes}m"
  61 + else
  62 + commit_age="${minutes}m"
68 63 fi
  64 +
  65 + color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
  66 + echo "$color$commit_age%{$reset_color%}"
69 67 fi
70 68 }
71 69  
... ... @@ -99,4 +97,3 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL=&quot;%{$fg[grey]%}&quot;
99 97 export LSCOLORS="exfxcxdxbxegedabagacad"
100 98 export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
101 99 export GREP_COLOR='1;33'
102   -
themes/candy-kingdom.zsh-theme
... ... @@ -13,7 +13,7 @@ patches: &lt;patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
13 13 }
14 14  
15 15 function box_name {
16   - [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
  16 + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
17 17 }
18 18  
19 19 PROMPT='
themes/fino-time.zsh-theme
... ... @@ -21,7 +21,7 @@ function prompt_char {
21 21 }
22 22  
23 23 function box_name {
24   - [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
  24 + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
25 25 }
26 26  
27 27  
themes/fino.zsh-theme
... ... @@ -17,7 +17,7 @@ function prompt_char {
17 17 }
18 18  
19 19 function box_name {
20   - [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST
  20 + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
21 21 }
22 22  
23 23 local ruby_env=''
themes/michelebologna.zsh-theme
1   -# reference colors
2   -GREEN="%{$fg_bold[green]%}"
3   -RED="%{$fg_bold[red]%}"
4   -CYAN="%{$fg_bold[cyan]%}"
5   -YELLOW="%{$fg_bold[yellow]%}"
6   -BLUE="%{$fg_bold[blue]%}"
7   -MAGENTA="%{$fg_bold[magenta]%}"
8   -WHITE="%{$fg_bold[white]%}"
9   -
10   -COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
11   -
12   -# color reset
13   -RESET_COLOR="%{$reset_color%}"
14   -
15   -# which color should be applied?
16   -USERNAME_NORMAL_COLOR=$WHITE
17   -USERNAME_ROOT_COLOR=$RED
18   -HOSTNAME_NORMAL_COLOR=$BLUE
19   -# uncomment next line if you want auto-generated hostname color
20   -#for i in $HOST; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
21   -HOSTNAME_ROOT_COLOR=$RED
22   -HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
23   -CURRENT_DIR_COLOR=$CYAN
24   -
25   -# zsh commands
26   -USERNAME_COMMAND="%n"
27   -HOSTNAME_COMMAND="%m"
28   -CURRENT_DIR="%~"
29   -
30   -# output: colors + commands
31   -USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)"
32   -HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR"
33   -CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR"
34   -LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)"
35   -
36   -# git theming
37   -ZSH_THEME_GIT_PROMPT_PREFIX="("
  1 +# Michele Bologna's theme
  2 +# http://michelebologna.net
  3 +#
  4 +# This a theme for oh-my-zsh. Features a colored prompt with:
  5 +# * username@host: [jobs] [git] workdir %
  6 +# * hostname color is based on hostname characters. When using as root, the
  7 +# prompt shows only the hostname in red color.
  8 +# * [jobs], if applicable, counts the number of suspended jobs tty
  9 +# * [git], if applicable, represents the status of your git repo (more on that
  10 +# later)
  11 +# * '%' prompt will be green if last command return value is 0, yellow otherwise.
  12 +#
  13 +# git prompt is inspired by official git contrib prompt:
  14 +# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh
  15 +# and it adds:
  16 +# * the current branch
  17 +# * '%' if there are untracked files
  18 +# * '$' if there are stashed changes
  19 +# * '*' if there are modified files
  20 +# * '+' if there are added files
  21 +# * '<' if local repo is behind remote repo
  22 +# * '>' if local repo is ahead remote repo
  23 +# * '=' if local repo is equal to remote repo (in sync)
  24 +# * '<>' if local repo is diverged
  25 +
  26 +local green="%{$fg_bold[green]%}"
  27 +local red="%{$fg_bold[red]%}"
  28 +local cyan="%{$fg_bold[cyan]%}"
  29 +local yellow="%{$fg_bold[yellow]%}"
  30 +local blue="%{$fg_bold[blue]%}"
  31 +local magenta="%{$fg_bold[magenta]%}"
  32 +local white="%{$fg_bold[white]%}"
  33 +local reset="%{$reset_color%}"
  34 +
  35 +local -a color_array
  36 +color_array=($green $red $cyan $yellow $blue $magenta $white)
  37 +
  38 +local username_normal_color=$white
  39 +local username_root_color=$red
  40 +local hostname_root_color=$red
  41 +
  42 +# calculating hostname color with hostname characters
  43 +for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]]
  44 +local -a hostname_color
  45 +hostname_color=%(!.$hostname_root_color.$hostname_normal_color)
  46 +
  47 +local current_dir_color=$blue
  48 +local username_command="%n"
  49 +local hostname_command="%m"
  50 +local current_dir="%~"
  51 +
  52 +local username_output="%(!..$username_normal_color$username_command$reset@)"
  53 +local hostname_output="$hostname_color$hostname_command$reset"
  54 +local current_dir_output="$current_dir_color$current_dir$reset"
  55 +local jobs_bg="${red}fg: %j$reset"
  56 +local last_command_output="%(?.%(!.$red.$green).$yellow)"
  57 +
  58 +ZSH_THEME_GIT_PROMPT_PREFIX=""
38 59 ZSH_THEME_GIT_PROMPT_SUFFIX=""
39   -ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
40   -ZSH_THEME_GIT_PROMPT_CLEAN=")"
  60 +ZSH_THEME_GIT_PROMPT_DIRTY=""
  61 +ZSH_THEME_GIT_PROMPT_CLEAN=""
  62 +ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
  63 +ZSH_THEME_GIT_PROMPT_MODIFIED="*"
  64 +ZSH_THEME_GIT_PROMPT_ADDED="+"
  65 +ZSH_THEME_GIT_PROMPT_STASHED="$"
  66 +ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="="
  67 +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
  68 +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
  69 +ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>"
41 70  
42   -# wrap all together
43   -PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR '
44   -RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]'
  71 +PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)'
  72 +PROMPT+='$(__git_ps1)'
  73 +PROMPT+=" $last_command_output%#$reset "
  74 +RPROMPT=''
themes/minimal.zsh-theme
1 1 ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
2 2 ZSH_THEME_GIT_PROMPT_SUFFIX=""
3   -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}]%{$reset_color%} "
  3 +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} "
4 4 ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
5 5 ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
6 6 ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
7 7 ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
8 8 ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
  9 +ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
  10 +ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
  11 +ZSH_THEME_HG_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
  12 +ZSH_THEME_HG_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
9 13  
10 14 vcs_status() {
11   - if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then
  15 + if [[ $(whence in_svn) != "" ]] && in_svn; then
12 16 svn_prompt_info
  17 + elif [[ $(whence in_hg) != "" ]] && in_hg; then
  18 + hg_prompt_info
13 19 else
14 20 git_prompt_info
15 21 fi
16 22 }
17 23  
18   -PROMPT='%2~ $(vcs_status)»%b '
19 24 \ No newline at end of file
  25 +PROMPT='%2~ $(vcs_status)»%b '
themes/strug.zsh-theme
... ... @@ -0,0 +1,25 @@
  1 +# terminal coloring
  2 +export CLICOLOR=1
  3 +export LSCOLORS=dxFxCxDxBxegedabagacad
  4 +
  5 +local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
  6 +
  7 +PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch}
  8 +%{$fg[green]%}╰\$ %{$reset_color%}"
  9 +
  10 +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on "
  11 +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  12 +
  13 +ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}"
  14 +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}"
  15 +
  16 +ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true
  17 +ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}("
  18 +ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
  19 +
  20 +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +"
  21 +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%}
  22 +
  23 +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
  24 +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}
  25 +
tools/check_for_upgrade.sh
... ... @@ -41,10 +41,9 @@ then
41 41 then
42 42 _upgrade_zsh
43 43 else
44   - echo "[Oh My Zsh] Would you like to check for updates?"
45   - echo "Type Y to update oh-my-zsh: \c"
  44 + echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c"
46 45 read line
47   - if [ "$line" = Y ] || [ "$line" = y ]; then
  46 + if [ "$line" = Y ] || [ "$line" = y ] || [ -z "$line" ]; then
48 47 _upgrade_zsh
49 48 else
50 49 _update_zsh_update
... ... @@ -32,10 +32,12 @@ sed -i -e &quot;/export PATH=/ c\\
32 32 export PATH=\"$PATH\"
33 33 " ~/.zshrc
34 34  
35   -if [ "$SHELL" != "$(which zsh)" ]; then
  35 +TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
  36 +if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then
36 37 echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
37   - chsh -s `which zsh`
  38 + chsh -s $(grep /zsh$ /etc/shells | tail -1)
38 39 fi
  40 +unset TEST_CURRENT_SHELL
39 41  
40 42 echo "\033[0;32m"' __ __ '"\033[0m"
41 43 echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"