my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
3.3 KiB

3 years ago
  1. # Bundler
  2. This plugin adds completion for basic bundler commands, as well as aliases and helper functions for
  3. an easier experience with bundler.
  4. To use it, add `bundler` to the plugins array in your zshrc file:
  5. ```zsh
  6. plugins=(... bundler)
  7. ```
  8. ## Aliases
  9. | Alias | Command | Description |
  10. |--------|--------------------------------------|------------------------------------------------------------------------------------------|
  11. | `ba` | `bundle add` | Add gem to the Gemfile and run bundle install |
  12. | `bck` | `bundle check` | Verifies if dependencies are satisfied by installed gems |
  13. | `bcn` | `bundle clean` | Cleans up unused gems in your bundler directory |
  14. | `be` | `bundle exec` | Execute a command in the context of the bundle |
  15. | `bi` | `bundle install --jobs=<core_count>` | Install the dependencies specified in your Gemfile (using all cores in bundler >= 1.4.0) |
  16. | `bl` | `bundle list` | List all the gems in the bundle |
  17. | `bo` | `bundle open` | Opens the source directory for a gem in your bundle |
  18. | `bout` | `bundle outdated` | List installed gems with newer versions available |
  19. | `bp` | `bundle package` | Package your needed .gem files into your application |
  20. | `bu` | `bundle update` | Update your gems to the latest available versions |
  21. ## Gem wrapper
  22. The plugin adds a wrapper for common gems, which:
  23. - Looks for a binstub under `./bin/` and executes it if present.
  24. - Calls `bundle exec <gem>` otherwise.
  25. Common gems wrapped by default (by name of the executable):
  26. `annotate`, `cap`, `capify`, `cucumber`, `foodcritic`, `guard`, `hanami`, `irb`, `jekyll`, `kitchen`, `knife`, `middleman`, `nanoc`, `pry`, `puma`, `rackup`, `rainbows`, `rake`, `rspec`, `rubocop`, `shotgun`, `sidekiq`, `spec`, `spork`, `spring`, `strainer`, `tailor`, `taps`, `thin`, `thor`, `unicorn` and `unicorn_rails`.
  27. ### Settings
  28. You can add or remove gems from the list of wrapped commands.
  29. Please **use the exact name of the executable** and not the gem name.
  30. #### Include gems to be wrapped (`BUNDLED_COMMANDS`)
  31. Add this before the plugin list in your `.zshrc`:
  32. ```sh
  33. BUNDLED_COMMANDS=(rubocop)
  34. plugins=(... bundler ...)
  35. ```
  36. This will add the wrapper for the `rubocop` gem (i.e. the executable).
  37. #### Exclude gems from being wrapped (`UNBUNDLED_COMMANDS`)
  38. Add this before the plugin list in your `.zshrc`:
  39. ```sh
  40. UNBUNDLED_COMMANDS=(foreman spin)
  41. plugins=(... bundler ...)
  42. ```
  43. This will exclude the `foreman` and `spin` gems (i.e. their executable) from being wrapped.
  44. ### Excluded gems
  45. These gems should not be called with `bundle exec`. Please see [issue #2923](https://github.com/ohmyzsh/ohmyzsh/pull/2923) on GitHub for clarification:
  46. - `berks`
  47. - `foreman`
  48. - `mailcatcher`
  49. - `rails`
  50. - `ruby`
  51. - `spin`