34bc91e79d8cbb7b889402746770f1671d9b5872

Author
Thomas Kriechbaumer <kriechbaumer@gmail.com>
Committer
Thomas Kriechbaumer <kriechbaumer@gmail.com>
Date

Message

added Bundler readme file

Diff

 1diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..56f0c71767c66d0ba5c3f0306a6450d8f438c278
 4--- /dev/null
 5+++ b/plugins/bundler/README.md
 6@@ -0,0 +1,49 @@
 7+# Bundler
 8+
 9+- adds completion for basic bundler commands
10+- adds short aliases for common bundler commands
11+  - `be` aliased to `bundle exec`
12+  - `bl` aliased to `bundle list`
13+  - `bp` aliased to `bundle package`
14+  - `bo` aliased to `bundle open`
15+  - `bu` aliased to `bundle update`
16+  - `bi` aliased to `bundle install --jobs=<cpu core count>` (only for bundler `>= 1.4.0`)
17+- adds a wrapper for common gems:
18+  - looks for a binstub under `./bin/` and executes it (if present)
19+  - calls `bundle exec <gem executable>` otherwise
20+
21+For a full list of *common gems* being wrapped by default please look at the `bundler.plugin.zsh` file.
22+
23+## Configuration
24+
25+Please use the exact name of the executable and not the gem name.
26+
27+### Add additional gems to be wrapped
28+
29+Add this before the plugin-list in your `.zshrc`:
30+```sh
31+BUNDLED_COMMANDS=(rubocop)
32+plugins=(... bundler ...)
33+```
34+This will add the wrapper for the `rubocop` gem (i.e. the executable).
35+
36+
37+### Exclude gems from being wrapped
38+
39+Add this before the plugin-list in your `.zshrc`:
40+```sh
41+UNBUNDLED_COMMANDS=(foreman spin)
42+plugins=(... bundler ...)
43+```
44+This will exclude the `foreman` and `spin` gems (i.e. their executable) from being wrapped.
45+
46+## Excluded gems
47+
48+These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification.
49+
50+`berks`
51+`foreman`
52+`mailcatcher`
53+`rails`
54+`ruby`
55+`spin`
56diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
57index 4f9eea9223cab4643aa3808a9cf2b1bf622286cc..9c920aa1f4b9954aaf3da2fc99c2506b871b3802 100644
58--- a/plugins/bundler/bundler.plugin.zsh
59+++ b/plugins/bundler/bundler.plugin.zsh
60@@ -100,6 +100,6 @@ for cmd in $bundled_commands; do
61   alias $cmd=bundled_$cmd
62 
63   if which _$cmd > /dev/null 2>&1; then
64-        compdef _$cmd bundled_$cmd=$cmd
65+    compdef _$cmd bundled_$cmd=$cmd
66   fi
67 done